On Sat, Mar 12, 2011 at 5:41 PM, "Martin v. Löwis" <[email protected]> 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   |   [email protected]   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
[email protected]
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