#NEWLINE# @ classmethod #NEWLINE# def create( cls , allowed_keys ) : #NEWLINE# #INDENT# allowed_keys_tuple = tuple ( ( ( ( '_reserved_' + k ) if ( k in cls . _special_fields ) else k ) for k in allowed_keys ) ) #NEWLINE# allowed_keys = frozenset ( allowed_keys_tuple ) #NEWLINE# if ( allowed_keys not in cls . _classes ) : #NEWLINE# #INDENT# class SpecificStrictDict ( cls ) : #NEWLINE# #INDENT# __slots__ = allowed_keys_tuple #NEWLINE# def __repr__( self ) : #NEWLINE# #INDENT# return ( '{%s}' % ', ' . join ( ( '"{0!s}": {0!r}' . format ( k ) for k in self . iterkeys ( ) ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# cls . _classes [ allowed_keys ] = SpecificStrictDict #NEWLINE# #UNINDENT# return cls . _classes [ allowed_keys ]