On Nov 27, 3:20 am, Roy Smith <[EMAIL PROTECTED]> wrote:

> If you want to have a little fun:
>
> class peverse:
>     def __call__(self):
>         raise AttributeError ("peverse instance has no __call__ method")
>
> x = peverse()
> x()

That is "peverse", but still...

from types import FunctionType
type(x) == FunctionType # False

And you can't (easily?) subclass FunctionType:

Error when calling the metaclass bases
  type 'function' is not an acceptable base type

;)

Regards,
Jordan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to