mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Create two new exceptions: IndentationError and TabError. These are
used for indentation related errors. This patch includes Ping's improvements for indentation-related error messages. Closes SourceForge patches #100734 and #100856.
This commit is contained in:
parent
88e1932930
commit
85f363990c
10 changed files with 80 additions and 19 deletions
|
@ -86,6 +86,14 @@ r(SyntaxError)
|
|||
try: exec '/\n'
|
||||
except SyntaxError: pass
|
||||
|
||||
r(IndentationError)
|
||||
|
||||
r(TabError)
|
||||
# can only be tested under -tt, and is the only test for -tt
|
||||
#try: compile("try:\n\t1/0\n \t1/0\nfinally:\n pass\n", '<string>', 'exec')
|
||||
#except TabError: pass
|
||||
#else: raise TestFailed
|
||||
|
||||
r(SystemError)
|
||||
print '(hard to reproduce)'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue