23 Aug
2004
23 Aug
'04
5:40 p.m.
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