Merge pull request #97 from dahlia/syntax-error-attributes

Specify attribute types of SyntaxError
This commit is contained in:
Guido van Rossum
2016-02-29 10:15:57 -08:00
2 changed files with 10 additions and 2 deletions

View File

@@ -814,7 +814,11 @@ class OSError(EnvironmentError): ...
class WindowsError(OSError): ...
class OverflowError(ArithmeticError): ...
class ReferenceError(StandardError): ...
class SyntaxError(StandardError): ...
class SyntaxError(StandardError):
msg = ... # type: str
lineno = ... # type: int
offset = ... # type: int
text = ... # type: str
class IndentationError(SyntaxError): ...
class TabError(IndentationError): ...
class SystemError(StandardError): ...

View File

@@ -775,7 +775,11 @@ class WindowsError(OSError): ...
class OverflowError(ArithmeticError): ...
class ReferenceError(Exception): ...
class StopIteration(Exception): ...
class SyntaxError(Exception): ...
class SyntaxError(Exception):
msg = ... # type: str
lineno = ... # type: int
offset = ... # type: int
text = ... # type: str
class IndentationError(SyntaxError): ...
class TabError(IndentationError): ...
class SystemError(Exception): ...