1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-12 01:34:19 +02:00

Merge pull request #22 from NickPresta/patch-1

Python: Removing the bit about commas and exceptions.
This commit is contained in:
lodin
2013-06-30 16:22:54 -07:00

View File

@@ -290,12 +290,6 @@ try:
except IndexError as e: except IndexError as e:
pass # Pass is just a no-op. Usually you would do recovery here. 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 ## 4. Functions