#NEWLINE# def thread_local_property( name ) : #NEWLINE# #INDENT# 'Creates a thread local ``property``.' #NEWLINE# name = ( '_thread_local_' + name ) #NEWLINE# def fget( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return getattr ( self , name ) . value #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# def fset( self , value ) : #NEWLINE# #INDENT# getattr ( self , name ) . value = value #NEWLINE# #UNINDENT# return property ( fget = fget , fset = fset )