Message166142
| Author |
mstefanro |
| Recipients |
alexandre.vassalotti, asvetlov, daniel.urban, loewis, meador.inge, mstefanro, ncoghlan, rhettinger, sbt, yselivanov |
| Date |
2012年07月22日.15:19:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342970361.06.0.891042192289.issue15397@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|