- def G():
- try:
- make_an_error
- except Exception:
- yield 'whatever'
- raise
- g = G()
- assert(g.next() == 'whatever')
- gotnameerror = False
- try:
- g.next()
- except NameError:
- gotnameerror = True
- assert(gotnameerror == True)
why breaky python
Posted by Anonymous on Fri 7th Jan 2011 19:51
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.