<s> registered = { } <EOL> registered_lock = { } <EOL> def register ( f = None , lock = True ) : <EOL> """<STR_LIT>""" <EOL> def decorator ( f , lock = lock ) : <EOL> registered [ f . __name__ ] = f <EOL> if lock : <EOL> registered_lock [ f . __name__ ] = f <EOL> return f <EOL> if callable ( f ) : <EOL> return decorator ( f , lock ) <EOL> return decorator </s>
