def __setattr__(self, name, value):
    if name in self.__by_name or name.startswith('_Message__'):
      object.__setattr__(self, name, value)
    else:
      raise AttributeError("May not assign arbitrary value %s "
                           "to message %s" % (name, type(self).__name__))
Like inspect.getargspec but supports functools.partial as well.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/messages.py/Message.__setattr__--crossover with--dataset/ETHPy150Open jazzband/django-configurations/configurations/utils.py/getargspec