[Zope3-checkins] CVS: Zope3/src/zope/proxy/context/tests - test_wrapper.py:1.4
Steve Alexander
steve@cat-box.net
Wed, 09 Apr 2003 17:36:26 +0200
Guido van Rossum wrote:
>>>BTW, can't this
>>> t1 = type('ContextUnawareObj', (), {slot: doit})
>>>be spelled as
>>>
>>>class ContextUnawareObj(object):
>>> slot = doit
>>
>>No. That would be:
>>
>> t1 = type('ContextUnawareObj', (), {'slot': doit})
>
>
> Very subtle!
>
> I'd suggest this:
>
> class ContextUnawareObj(object):
> pass
> setattr(ContextUnawareObj, slot, doit)
>
> The 3-arg type(...) call is very uncommon (except among
> meta-programmers :-) and many people would not know what it does. The
> class statement + setattr() call is pretty obvious.
Ok. I'll change it to be like this once I've tracked down the remaining
elusive leak.
optimism-eternally-yr's,
--
Steve Alexander