def reraise_uncaught(func):
 @functools.wraps(func)
 def wrapper(*args, **kwds):
  try:
   return func(*args, **kwds)
  except AttributeError:
   exc_info = sys.exc_info()
   reraise(UncaughtAttributeError(exc_info[1]), exc_info[2])
 return wrapper

def reraise_uncaught ( func ) : @ functools . wraps ( func ) def wrapper ( * args , ** kwds ) : try : return func ( * args , ** kwds ) except AttributeError : exc_info = sys . exc_info ( ) reraise ( UncaughtAttributeError ( exc_info [ 1 ] ) , exc_info [ 2 ] ) return wrapper
re-throw uncaught attributeerror .