Re: [Python-Dev] __long__ method still exists in Python 3.x

2009-01-11 Thread Benjamin Peterson
On Sun, Jan 11, 2009 at 12:40 PM, "Martin v. Löwis" wrote: >> I noticed that the builtin numeric types (int, float, complex) all still >> have a __long__ method in 3.x. Shouldn't this have disappeared as >> part of the int/long unification? Is there any reason not to remove this >> (by setting t

Re: [Python-Dev] __long__ method still exists in Python 3.x

2009-01-11 Thread Martin v. Löwis
> I noticed that the builtin numeric types (int, float, complex) all still > have a __long__ method in 3.x. Shouldn't this have disappeared as > part of the int/long unification? Is there any reason not to remove this > (by setting the nb_long entry to 0 in all three cases)? There are, apparentl

Re: [Python-Dev] How should I handle unsupported features?

2009-01-11 Thread Martin v. Löwis
> Porting to MS Windows CE, I find that e.g. signals or environment vars are > not > supported. How should I handle that? So that scripts that try to make use of these features operate in a reasonable way. > In particular, I'm talking about > PyOS_getsig() and PyOS_setsig(). Should I just #if

[Python-Dev] __long__ method still exists in Python 3.x

2009-01-11 Thread Mark Dickinson
I noticed that the builtin numeric types (int, float, complex) all still have a __long__ method in 3.x. Shouldn't this have disappeared as part of the int/long unification? Is there any reason not to remove this (by setting the nb_long entry to 0 in all three cases)? Mark ___

[Python-Dev] How should I handle unsupported features?

2009-01-11 Thread Ulrich Eckhardt
Hi! Porting to MS Windows CE, I find that e.g. signals or environment vars are not supported. How should I handle that? In particular, I'm talking about PyOS_getsig() and PyOS_setsig(). Should I just #ifdef them out completely or should I implement them by setting an error? Which error should I

Re: [Python-Dev] operator.itemgetter with a callback method

2009-01-11 Thread Alexandre Fiori
thanks! On Sun, Jan 11, 2009 at 2:12 PM, Guilherme Polo wrote: > On Sun, Jan 11, 2009 at 2:02 PM, Alexandre Fiori wrote: > > > > hello > > > > i was thinking about a possible improvement for the itemgetter > > the documentation page shows simple examples like sorting a dictionary by > > its int

Re: [Python-Dev] operator.itemgetter with a callback method

2009-01-11 Thread Guilherme Polo
On Sun, Jan 11, 2009 at 2:02 PM, Alexandre Fiori wrote: > > hello > > i was thinking about a possible improvement for the itemgetter > the documentation page shows simple examples like sorting a dictionary by > its integer values Hi, Sorry for starting like this but ideas are supposed to be emai

[Python-Dev] operator.itemgetter with a callback method

2009-01-11 Thread Alexandre Fiori
hello i was thinking about a possible improvement for the itemgetter the documentation page shows simple examples like sorting a dictionary by its integer values, like this: >>> inventory = [('apple', 3), ('banana', 2), ('pear', 5), ('orange', 1)] >>> getcount = itemgetter(1) >>> map(getcount, in