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 @@ -828,15 +828,15 @@ form.
828
828
829
829
.. attribute :: pos
830
830
831
- The index of *pattern * where compilation failed.
831
+ The index in *pattern * where compilation failed (may be `` None ``) .
832
832
833
833
.. attribute :: lineno
834
834
835
- The line corresponding to *pos *.
835
+ The line corresponding to *pos * (may be `` None ``) .
836
836
837
837
.. attribute :: colno
838
838
839
- The column corresponding to *pos *.
839
+ The column corresponding to *pos * (may be `` None ``) .
840
840
841
841
.. versionchanged :: 3.5
842
842
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