def threaded(callback=(lambda *args, **kwargs: None), daemonic=False):
 def innerDecorator(func):
  def inner(*args, **kwargs):
   target = (lambda : callback(func(*args, **kwargs)))
   t = threading.Thread(target=target)
   t.setDaemon(daemonic)
   t.start()
  return inner
 return innerDecorator

def threaded ( callback = ( lambda * args , ** kwargs : None ) , daemonic = False ) : def innerDecorator ( func ) : def inner ( * args , ** kwargs ) : target = ( lambda : callback ( func ( * args , ** kwargs ) ) ) t = threading . Thread ( target = target ) t . setDaemon ( daemonic ) t . start ( ) return inner return innerDecorator
apply func to sub--elements of an object .