I would discourage use of the decorate/sort/undecorate pattern,
and encourage use of the key= argument. Or, if you really need
to decorate into a tuple, still pass a key= argument.
The bug report was actually about the sched module which used
heapq to prioritize tuples consisting of times, priorities, and actions.
I fixed and closed the original bug a few hours ago but had a
thought that the pattern itself may be ubiquitious (especially with heapq).
ISTM that other bugs like this are lurking about. But all of you
guys seem to think the status quo is fine, so that's the end of it.
Cheers,
Raymond
_______________________________________________
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