#NEWLINE# def install_registry( self , registry ) : #NEWLINE# #INDENT# '\n        Install a *registry* (a imputils.Registry instance) of function\n        and attribute implementations.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# loader = self . _registries [ registry ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# loader = RegistryLoader ( registry ) #NEWLINE# self . _registries [ registry ] = loader #NEWLINE# #UNINDENT# self . insert_func_defn ( loader . new_registrations ( 'functions' ) ) #NEWLINE# self . _insert_getattr_defn ( loader . new_registrations ( 'getattrs' ) ) #NEWLINE# self . _insert_setattr_defn ( loader . new_registrations ( 'setattrs' ) ) #NEWLINE# self . _insert_cast_defn ( loader . new_registrations ( 'casts' ) ) #NEWLINE# self . _insert_get_constant_defn ( loader . new_registrations ( 'constants' ) )