[Tutor] List sorting issues

2011-03-28 Thread Eric Stevens
I am currently designing an address book program, and am trying to design a method for organizing the keys (which are the names of the entries) for displaying purposes. I have created a list by doing sortedKeys = self.addbook.keys() {the self.addbook refers to a dictionary in a custom class}, and

Re: [Tutor] List sorting issues

2011-03-28 Thread Luke Paireepinart
Sort returns none because it changes your list in-place. Print your list out after calling sort and you should see the new one. - Sent from a mobile device. Apologies for brevity and top-posting. - On Mar 28, 2011, at 11:53 AM, Eric

Re: [Tutor] List sorting issues

2011-03-28 Thread Steven D'Aprano
Eric Stevens wrote: I am currently designing an address book program, and am trying to design a method for organizing the keys (which are the names of the entries) for displaying purposes. I have created a list by doing sortedKeys = self.addbook.keys() {the self.addbook refers to a dictionary in