def __getattr__(self, name):
if name in self.fields:<EOL><INDENT>return self.fields[name]<EOL><DEDENT>else:<EOL><INDENT>if name == u"<STR_LIT>":<EOL><INDENT>for field_name, field in self.fields.items():<EOL><INDENT>if field.options.get('<STR_LIT>', False):<EOL><INDENT>return field<EOL><DEDENT><DEDENT><DEDENT>raise AttributeError("<STR_LIT>".format(name, self.table_name))<EOL><DEDENT>
return the Field instance for the given name

return -- string -- the string value of the attribute name, eg, self.foo returns "foo"