El resto del código es correcto. Te aconsejo identar siempre usando 4 espacios de acuerdo a PEP-8.
Tu record.py
debe ser así:
import warnings
class metaMetaBunch(type):
def __new__(cls, classname, bases, classdict):
def __init__(self, **kw):
for k in self.__dflts__: setattr(self, k, self.__dflts__[k])
for k in kw: setattr(self, k, kw[k])
def __repr__(self):
rep = [ '%s=%r' % (k, getattr(self, k)) for k in self.__dflts__
if getattr(self, k) != self.__dflts__[k]
]
return '%s(%s)' % (classname, ', '.join(rep))
newdict = { '__slots__':[], '__dflts__':{},
'__init__':__init__, '__repr__':__repr__, }
for k in classdict:
if k.startswith('__'):
if k in newdict:
warnings.warn("Can't set attr %r in bunch-class %r" % (
k, classname))
else:
newdict[k] = classdict[k]
else:
newdict['__slots__'].append(k)
newdict['__dflts__'][k] = classdict[k]
return type.__new__(cls, classname, bases, newdict)
class record(object, metaclass= metaMetaBunch):
pass
Para ver esta y otras diferencias entre Python 2 y Python 3 puedes mirarte: