Advertisement
Guest User

Py2 - Py3 incompatibility

a guest
Jan 23rd, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def foo():
  2.   e = None
  3.   for _ in 'foobar':
  4.     try:
  5.       raise AttributeError
  6.     except AttributeError as e:
  7.       pass
  8.     else:
  9.       e = None
  10.   if e:
  11.     raise AttributeError
  12.  
  13. foo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement