problems with dict() in python 2.2

O

Olaf Meyer

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.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?

Thanks,
Olaf
 
J

Just

Olaf Meyer said:
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.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
 
O

Olaf Meyer

Just said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top