Python Forum
has anyone implemented a sort command in Python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
has anyone implemented a sort command in Python?
#5
(Dec-16-2018, 05:14 AM)Skaperen Wrote: are you giving it away, anywhere?

i am looking to modify a sort command to sort by keys of IP addresses.

That was years ago, I'd could maybe find it, but it would be a pain. But I don't think it would be a good idea. Python's sort uses Timsort, which is a more efficient combination of merge and insertion sort. But Timsort is not covered in Introduction to Algorithms, so anything I did would be less efficient regardless of implementation issues. But there are implementation issues, as my sorts were pure Python, and Python's sort is implemented in C, a much faster language.

I would expect that Python's sort with a proper key function would be faster than anything I had implemented.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: has anyone implemented a sort command in Python? - by ichabod801 - Dec-16-2018, 12:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how operators are implemented as function calls Skaperen 5 3,646 Dec-15-2018, 03:14 AM
Last Post: ichabod801
  Ugh, Someone Went and Implemented Case ichabod801 2 2,840 Sep-15-2017, 09:46 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020