@@ -69,7 +69,7 @@ The error messages in this situation are not very helpful on their own:
69
69
.. code-block :: python
70
70
71
71
>> > for e in errors:
72
- ... print e.message
72
+ ... print ( e.message)
73
73
The instance is not valid under any of the given schemas
74
74
The instance is not valid under any of the given schemas
75
75
The instance is not valid under any of the given schemas
@@ -82,7 +82,7 @@ will be the index in our list.
82
82
.. code-block :: python
83
83
84
84
>> > for e in errors:
85
- ... print list (e.path)
85
+ ... print ( list (e.path) )
86
86
[0 ]
87
87
[1 ]
88
88
[2 ]
@@ -104,7 +104,7 @@ the schema each of these errors come from. In the case of sub-errors from the
104
104
105
105
>> > for e in errors:
106
106
... for sube in sorted (e.context, key = lambda e : e.schema_path):
107
- ... print list (sube.schema_path), sube
107
+ ... print ( list (sube.schema_path), sube)
108
108
[0 , ' type' ] {} is not of type ' string'
109
109
[1 , ' type' ] {} is not of type ' integer'
110
110
[0 , ' type' ] 3 is not of type ' string'
@@ -149,7 +149,7 @@ For clarity's sake, the given instance has three errors under this schema:
149
149
150
150
>> > v = Draft3Validator(schema)
151
151
>> > for error in sorted (v.iter_errors([" spam" , 2 ]), key = str ):
152
- ... print error
152
+ ... print ( error)
153
153
' spam' is not of type ' number'
154
154
' spam' is not one of [1 , 2 , 3 ]
155
155
[' spam' , 2 ] is too short
0 commit comments