Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 14, 2011 at 18:45 | comment | added | Thomas Wouters | The Python 3 syntax works in 2.6 and 2.7 as well, yes. | |
| Jul 14, 2011 at 5:49 | comment | added | wim | i may be showing my youth here, but i have always used the python 3 syntax in python 2.7 with no issue | |
| Jun 23, 2010 at 12:32 | comment | added | Bite code | @Lucas S. Well, I didn't know it, and I'm glad it's written here. | |
| Apr 6, 2010 at 2:08 | history | edited | bignose | CC BY-SA 2.5 | Show exception syntax for both Python 2 and Python 3. |
| May 5, 2009 at 20:27 | comment | added | ianb | Maybe more magical,exc_info = sys.exc_info(); raise exc_info[0], exc_info[1], exc_info[2] is equivalent to this, but you can change those values around (e.g., change the exception type or message) | |
| Jan 27, 2009 at 3:14 | comment | added | habnabit | Note the italicized text. Some people will doraise e instead, which doesn't preserve the original traceback. | |
| Sep 21, 2008 at 15:00 | history | made wiki | Post Made Community Wiki byCommunityBot | ||
| Sep 19, 2008 at 14:04 | comment | added | Lucas S. | Sorry but this is a well known and common feature of almost all languages. | |
| Sep 19, 2008 at 13:56 | history | answered | Thomas Wouters | CC BY-SA 2.5 |