Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > sorted

Reply
Thread Tools

sorted

 
 
thomas
Guest
Posts: n/a
 
      08-18-2006
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
 
Reply With Quote
 
 
 
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      08-18-2006
On Fri, 18 Aug 2006 09:31:54 +0200, thomas <(E-Mail Removed)> declaimed
the following in comp.lang.python:

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

<snip>
>
> 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
http://www.velocityreviews.com/forums/(E-Mail Removed) (E-Mail Removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (E-Mail Removed))
HTTP://www.bestiaria.com/
 
Reply With Quote
 
 
 
 
thomas
Guest
Posts: n/a
 
      08-18-2006
Dennis Lee Bieber skrev:
> On Fri, 18 Aug 2006 09:31:54 +0200, thomas <(E-Mail Removed)> declaimed
> the following in comp.lang.python:
>
>> I what to used the sorted function, and im getting this error
>>

> <snip>
>> 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


Sorry

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


Thanks for the quick answer

regards
thomas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox, getting pulldown bookmarks sorted? Galaxy Firefox 4 07-01-2004 02:01 AM
Firefox, getting pulldown bookmarks sorted? Galaxy Firefox 1 06-28-2004 11:19 AM
Any control with Sorted property ? Steve Caliendo ASP .Net 2 02-28-2004 08:39 PM
datalist items not sorted. jason@cyberpine.com ASP .Net 0 01-31-2004 08:56 PM
Re: Correct DataTable index from sorted DataView... Nathan Baulch ASP .Net 0 06-26-2003 12:16 AM



Advertisments