#NEWLINE# def get( self , name , factory , * factory_args , **factory_kwargs ) : #NEWLINE# #INDENT# 'Get attribute, creating if required using specified factory.' #NEWLINE# update_thread_local = getattr ( factory , 'update_thread_local' , True ) #NEWLINE# if ( ( not update_thread_local ) or ( name not in self . __dict__ ) ) : #NEWLINE# #INDENT# obj = factory ( * factory_args , ** self ) #NEWLINE# if update_thread_local : #NEWLINE# #INDENT# setattr ( self , name , obj ) #NEWLINE# #UNINDENT# return obj #NEWLINE# #UNINDENT# return getattr ( self , name )