problems with dict() in python 2.2
Just
just at xs4all.nl
Tue Jan 13 05:13:26 EST 2004
In article <shPMb.6507$k4.144431 at news1.nokia.com>,
Olaf Meyer <nomail at nospam.net> wrote:
> I'm trying to build a dictionary using python's dict type, but somehow
> it does not work the way I expect it to. Here's the code:
>
> Python 2.2.1 (#7, Jan 9 2004, 16:59:31) [C] on hp-ux11
> Type "help", "copyright", "credits" or "license" for more information.
> >>> data=dict(red=1)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: 'red' is an invalid keyword argument for this function
>
> What am I doing wrong?
You're using a 2.3 feature in 2.2.
Just
More information about the Python-list
mailing list