Re: [Python-3000] Need closure on __cmp__ removal

2008-01-15 Thread David A. Wheeler
5, 2008 10:40 PM, hashcollision <[EMAIL PROTECTED]> wrote: > > David A. Wheeler has already written a draft PEP, which can be found here: > > http://www.dwheeler.com/misc/pep-cmp.txt. You can blame me for that :-). Guido van Rossum: > Thanks, I'd missed that. > >

[Python-3000] Add "generalized boolean" as ABC to PEP 3119

2007-10-16 Thread David A. Wheeler
d bools. Many functions accept generalized bools, not strictly bools, and it'd be very nice to be able to explicitly _denote_ that in a standard way. --- David A. Wheeler ___ Python-3000 mailing list Python-3000@python.org http://mail.pyth

[Python-3000] Add python-3000-like print function to python 2.6

2007-10-16 Thread David A. Wheeler
ble sooner than 3.0, so that we can use them earlier? Obviously people can create their own such function, but having a STANDARD name for it would mean that 2to3 could easily automate that translation. Plus, it'd help people get used to the idea of a printing _function_. --- D

[Python-3000] Please re-add __cmp__ to python 3000

2007-10-16 Thread David A. Wheeler
; once you get that ONE operator right, ALL comparisons are right. I think the python 2 way is better: individual operations for the cases where you want to handle each case specially, and a single __cmp__ function that is a simple way to handle comparisons all at once. --- David

Re: [Python-3000] Add python-3000-like print function to python 2.6

2007-10-16 Thread David A. Wheeler
ut Python 2->3 transition would be nice too. Also... will the 2to3 tool support this? What I mean is, if 2to3 sees "from __future__ import print_function", will it leave print function calls alone? If not, could that be changed? Thanks. --- David A. Wheeler __

Re: [Python-3000] Please re-add __cmp__ to python 3000

2007-10-17 Thread David A. Wheeler
GOOD thing, not a wart or obsolete feature. Adding a standard comparison mixin in a library is probably a good idea as well, but restoring __cmp__ is in my mind more important. I can write my own mixin, but working around a failure to call __cmp__ gives a big performance hit. --- David A. Wheeler

Re: [Python-3000] Please re-add __cmp__ to python 3000

2007-10-17 Thread David A. Wheeler
I ran it 3 times, and took the min of each. Using the min() of each number, we have a mixin performance overhead of (10.91-7.26)/7.26 = 50.3% --- David A. Wheeler ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman

Re: [Python-3000] Please re-add __cmp__ to python 3000

2007-10-29 Thread David A. Wheeler
hod in the 3.0 age." It _seems_ to me that this is the same as "__cmp__", and if so, let's just keep using the same name (there's nothing wrong with the name!). But maybe I just don't understand the comment, so explanation welcome. --- David A. Wheeler ==