problems with dict() in python 2.2
Olaf Meyer
nomail at nospam.net
Tue Jan 13 05:19:23 EST 2004
Just wrote:
> 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
Allright, I thought it was 2.2. Too bad, since I cannot get 2.3 compiled
on HP-UX.
Olaf
More information about the Python-list
mailing list