Optimizing methods away or not?
Arnaud Delobelle
arnodel at googlemail.com
Sun Dec 14 07:29:10 EST 2008
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> On Sun, 14 Dec 2008 10:52:25 +0000, Arnaud Delobelle wrote:
>
>> You could also not use the metaclass and use post_verify as a decorator
>
> Except that self.verify doesn't exist if __debug__ is false.
OK I wrote this as an afterthought. I'm, sure it's not beyond your ability
to add
if not __debug__:
return method
at the start of the post_verify function :)
--
Arnaud
More information about the Python-list
mailing list