[Zope] Possible dictionary bug?
Paul Winkler
pw_lists at slinkp.com
Mon Aug 23 13:40:43 EDT 2004
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.
--
Paul Winkler
http://www.slinkp.com
More information about the Zope
mailing list