Re: [Python-Dev] future_builtins (was: Backporting PEP 3127 to trunk)

2008-02-24 Thread Collin Winter
On Sat, Feb 23, 2008 at 8:06 AM, Guido van Rossum [EMAIL PROTECTED] wrote: I don't think a -3 warning for oct or hex would do any good. I do think map() and filter() should issue a warning under -3 when the first arg is None. (Or does 2to3 detect this now?) 2to3 does detect that: it will

Re: [Python-Dev] future_builtins (was: Backporting PEP 3127 to trunk)

2008-02-24 Thread Guido van Rossum
On Sat, Feb 23, 2008 at 5:59 PM, Neal Norwitz [EMAIL PROTECTED] wrote: On Sat, Feb 23, 2008 at 8:06 AM, Guido van Rossum [EMAIL PROTECTED] wrote: I do think map() and filter() should issue a warning under -3 when the first arg is None. (Or does 2to3 detect this now?) What's wrong

Re: [Python-Dev] future_builtins (was: Backporting PEP 3127 to trunk)

2008-02-24 Thread Neal Norwitz
On Sun, Feb 24, 2008 at 6:57 PM, Guido van Rossum [EMAIL PROTECTED] wrote: On Sat, Feb 23, 2008 at 5:59 PM, Neal Norwitz [EMAIL PROTECTED] wrote: On Sat, Feb 23, 2008 at 8:06 AM, Guido van Rossum [EMAIL PROTECTED] wrote: I do think map() and filter() should issue a warning under

Re: [Python-Dev] future_builtins (was: Backporting PEP 3127 to trunk)

2008-02-24 Thread Guido van Rossum
On Sun, Feb 24, 2008 at 7:02 PM, Neal Norwitz [EMAIL PROTECTED] wrote: On Sun, Feb 24, 2008 at 6:57 PM, Guido van Rossum [EMAIL PROTECTED] wrote: On Sat, Feb 23, 2008 at 5:59 PM, Neal Norwitz [EMAIL PROTECTED] wrote: On Sat, Feb 23, 2008 at 8:06 AM, Guido van Rossum [EMAIL PROTECTED]

[Python-Dev] future_builtins (was: Backporting PEP 3127 to trunk)

2008-02-23 Thread Eric Smith
Georg Brandl wrote: Eric Smith schrieb: Guido van Rossum wrote: I wonder if, in order to change the behavior of various built-in functions, it wouldn't be easier to be able to write from future_builtins import oct, hex # and who knows what else This makes sense to me, especially if we have

Re: [Python-Dev] future_builtins

2008-02-23 Thread Eric Smith
Guido van Rossum wrote: I don't think a -3 warning for oct or hex would do any good. I'm curious as to why. oct and hex have different behavior in 3.0, which is what I thought -3 was for. hex might be overkill, as the only differences are the L and the __hex__ behavior. But oct is always

Re: [Python-Dev] future_builtins (was: Backporting PEP 3127 to trunk)

2008-02-23 Thread Neal Norwitz
On Sat, Feb 23, 2008 at 8:06 AM, Guido van Rossum [EMAIL PROTECTED] wrote: I do think map() and filter() should issue a warning under -3 when the first arg is None. (Or does 2to3 detect this now?) What's wrong with filter(None, seq)? That currently works in 3k: filter(None, range(5))