Stefan Mihaila <mstefa...@gmail.com> added the comment:

Richard, yes, I think that would work, I didn't think of using f.__self__'s 
type.
You might want to replace
  if self is not None and not isinstance(self, types.ModuleType):
with
  if self is not None and not isinstance(self, types.ModuleType) \
                      and not isinstance(self, type):
to correctly raise an exception when called on a classmethod too.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15397>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to