sorted

T

thomas

Hi NG

I what to used the sorted function, and im getting this error

Traceback (most recent call last):
File "F:\home\thomas\src\guisample\test1.py", line 59, in ?
main()
File "F:\home\thomas\src\guisample\test1.py", line 31, in main
sorted(cords, key=operator.itemgetter(1))
NameError: global name 'sorted' is not defined

what do I needs to import, to use this function ?

regards
thomas
 
D

Dennis Lee Bieber

I what to used the sorted function, and im getting this error
said:
what do I needs to import, to use this function ?
Uhm... the entire 2.4 version of Python?

You don't mention what version you have, but sorted() is new with
2.4
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
T

thomas

Dennis Lee Bieber skrev:
Uhm... the entire 2.4 version of Python?

You don't mention what version you have, but sorted() is new with
2.4

Sorry

I am using 2.3.
So now I know what to do :)


Thanks for the quick answer

regards
thomas
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top