Message 100994 - Python tracker (original) (raw)
Message100994
| Author | ezio.melotti |
|---|---|
| Recipients | ezio.melotti, scoder |
| Date | 2010-03-13.07:39:28 |
| SpamBayes Score | 9.116882e-06 |
| Marked as misclassified | No |
| Message-id | 1268465970.02.0.687006248779.issue8130@psf.upfronthosting.co.za |
| In-reply-to |
| Content |
|---|
| This is a not a bug and it's documented: http://docs.python.org/py3k/reference/compound_stmts.html#the-try-statement The solution is to assign the value to another variable: >>> try: raise ValueError ... except ValueError as e: exc = e ... >>> exc ValueError() >>> e Traceback (most recent call last): File "", line 1, in NameError: name 'e' is not defined |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-03-13 07:39:30 | ezio.melotti | set | recipients: + ezio.melotti, scoder |
| 2010-03-13 07:39:30 | ezio.melotti | set | messageid: 1268465970.02.0.687006248779.issue8130@psf.upfronthosting.co.za |
| 2010-03-13 07:39:28 | ezio.melotti | link | issue8130 messages |
| 2010-03-13 07:39:28 | ezio.melotti | create |