[Zope] Re: Possible dictionary bug?
Max M
maxm at mxm.dk
Mon Aug 23 16:50:35 EDT 2004
Garito wrote:
> Hi all
>
> I try these code in a Python Script:
>
> A = dict()
> A['Example'] = 1
>
> return A.update({'DoesItWorks': 'Perhaps'})
It is in fact a feature. It returns None to remind you that it changes a
mutable object.
Python does this a lot. The example you will probably meet most often in
the wild, is the list.sort() method, that doesn't return the list either.
I know that that one has fooled med a couple of times in the past.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
More information about the Zope
mailing list