On Sat, Mar 12, 2011 at 5:41 PM, "Martin v. Löwis" <mar...@v.loewis.de> wrote:
> Why not? IIUC, the current key function creates three objects: the tuple,
> the short string, and the int. With the class

Yeah, I misread the example. Using cmp_to_key would indeed save quite
a lot of memory in this case.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to