[Zope] Possible dictionary bug?

Garito garito at sistes.net
Mon Aug 23 14:28:15 EDT 2004


Paul Winkler wrote:

>On Mon, Aug 23, 2004 at 06:48:07PM +0200, Garito wrote:
>  
>
>>Hi all
>>
>>I try these code in a Python Script:
>>
>>A = dict()
>>A['Example'] = 1
>>
>>return A.update({'DoesItWorks': 'Perhaps'})
>>
>>In the python interpreter it works fine 
>>    
>>
>
>that's where you're mistaken.  dict.update always returns None.
>See the python library documentation.
>This is typical of methods that change mutable
>objects, such as list.sort, list.append, or list.extend.
>A notable exception is list.pop which both removes an item
>and returns it.
>
>  
>
Uups!!!! hehe my neuron seems to be drunk
Sorry!!!
Thank you Paul!!!



More information about the Zope mailing list