Message315569
| Author | Naris R |
|---|---|
| Recipients | Naris R, serhiy.storchaka |
| Date | 2018-04-21.13:19:47 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1524316787.66.0.682650639539.issue33323@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
This is a little bit contrived but it demonstrates the problem.
```
def good_exception():
raise Exception('something bad happened')
def bad_exception():
return next(iter([]))
def good(n):
return good_exception() + n
def bad(n):
return n - bad_exception()
import traceback
try:
max(good(i) for i in range(4)) # desirable behaviour
except:
traceback.print_exc()
try:
min(bad(i) for i in range(7)) # unhelpful error message
except:
traceback.print_exc()
``` |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-04-21 13:19:47 | Naris R | set | recipients: + Naris R, serhiy.storchaka |
| 2018-04-21 13:19:47 | Naris R | set | messageid: <1524316787.66.0.682650639539.issue33323@psf.upfronthosting.co.za> |
| 2018-04-21 13:19:47 | Naris R | link | issue33323 messages |
| 2018-04-21 13:19:47 | Naris R | create | |