File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -839,15 +839,15 @@ form.
839
839
840
840
.. attribute :: pos
841
841
842
- The index of *pattern * where compilation failed.
842
+ The index in *pattern * where compilation failed (may be `` None ``) .
843
843
844
844
.. attribute :: lineno
845
845
846
- The line corresponding to *pos *.
846
+ The line corresponding to *pos * (may be `` None ``) .
847
847
848
848
.. attribute :: colno
849
849
850
- The column corresponding to *pos *.
850
+ The column corresponding to *pos * (may be `` None ``) .
851
851
852
852
.. versionchanged :: 3.5
853
853
Added additional attributes.
Original file line number Diff line number Diff line change 21
21
# should this really be here?
22
22
23
23
class error (Exception ):
24
+ """Exception raised for invalid regular expressions.
25
+
26
+ Attributes:
27
+
28
+ msg: The unformatted error message
29
+ pattern: The regular expression pattern
30
+ pos: The index in the pattern where compilation failed (may be None)
31
+ lineno: The line corresponding to pos (may be None)
32
+ colno: The column corresponding to pos (may be None)
33
+ """
34
+
24
35
def __init__ (self , msg , pattern = None , pos = None ):
25
36
self .msg = msg
26
37
self .pattern = pattern
You can’t perform that action at this time.
0 commit comments