shelf membership

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Apr 1 03:50:53 EDT 2007


En Sat, 31 Mar 2007 21:22:20 -0300, John Machin <sjmachin at lexicon.net>  
escribió:

> On Apr 1, 8:02 am, Aaron Brady <a... at uchicago.edu> wrote:
>> can you shelve objects with membership?
>>
>> this gives you:
>>
>> TypeError: object does not support item assignment
>> dict 0 True
>> Exception exceptions.TypeError: 'object does not support item  
>> assignment'
>> in  ignored
>>
>> > ignored is a bit mysterious.  tx in advance.
>>
>
> Please supply the *full* traceback, using copy/paste.

Not this time. Exceptions in __del__ are ignored and all you got is that  
message.

To the OP: This comes from Shelf.__del__, which in turn calls close(),  
which tries to set the internal dict to 0 (?!). You may try overriding  
close() - but what do you want to achieve, exactly?

-- 
Gabriel Genellina




More information about the Python-list mailing list