mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Removing the bit about commas and exceptions.
This commit is contained in:
parent
0c0117a138
commit
6cfb00d106
@ -283,12 +283,6 @@ try:
|
||||
except IndexError as e:
|
||||
pass # Pass is just a no-op. Usually you would do recovery here.
|
||||
|
||||
# Works for Python 2.7 and down:
|
||||
try:
|
||||
raise IndexError("This is an index error")
|
||||
except IndexError, e: # No "as", comma instead
|
||||
pass
|
||||
|
||||
|
||||
####################################################
|
||||
## 4. Functions
|
||||
|
Loading…
Reference in New Issue
Block a user