PEP 3100 mentions that isCallable() and sequenceIncludes() are to be
removed from the operator module in Python 3000 because there are
better, more obvious ways of spelling these things.
So, on that note, should operator.truth() and operator.abs() be added
to the to-be-removed list, in favour of t
On 7/1/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 6/30/06, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > BJörn Lindqvist wrote:
> > > I have often wanted something similar to that for global
> > > variables, instead of the global declaration:
> > >
> > > cache = None
> > > def init():
> >
On 7/3/06, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
> On 7/1/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > On 6/30/06, Steven Bethard <[EMAIL PROTECTED]> wrote:
> > > BJörn Lindqvist wrote:
> > > > I have often wanted something similar to that for global
> > > > variables, instead of the gl
On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> PEP 3100 mentions that isCallable() and sequenceIncludes() are to be
> removed from the operator module in Python 3000 because there are
> better, more obvious ways of spelling these things.
>
> So, on that note, should operator.truth() and oper
On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > PEP 3100 mentions that isCallable() and sequenceIncludes() are to be
> > removed from the operator module in Python 3000 because there are
> > better, more obvious ways of spelling these
> > cache = None
> > def init():
> > if not cache:
> > pass
> >
> > Throws a NameError because cache is not declared in function init's
> > scope. So you would be forced to write:
> >
> > cache = None
> > def init():
> > if not global.cache:
> > global.cache = "foobar"
> >
>
+
On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > > PEP 3100 mentions that isCallable() and sequenceIncludes() are to be
> > > removed from the operator module in Python 3000 be
On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > Stupid question: why? What's the better spelling of operator.add?
>
> +
I reject your slippery slope argument that we'd have to remove
operator.add. Not that we'd be able to tell, but +
On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> +
But you can't pass a plus sign to higher-order functions.
> On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > > > P
On 7/3/06, Michael Urman <[EMAIL PROTECTED]> wrote:
> On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > > Stupid question: why? What's the better spelling of operator.add?
> >
> > +
>
> I reject your slippery slope argument that we'd
On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 7/3/06, Michael Urman <[EMAIL PROTECTED]> wrote:
> > On 7/3/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
> > > > Stupid question: why? What's the better spelling of operator.add?
BJörn Lindqvist wrote:
> I think the fix for that is to remove the "scope inheritance." I.e:
>
> cache = None
> def init():
> if not cache:
> pass
>
> Throws a NameError because cache is not declared in function init's
> scope.
And do you want
def f():
print "Eff!"
def g
Guido van Rossum wrote:
>
> On 7/3/06, Collin Winter <[EMAIL PROTECTED]> wrote:
>
> > Stupid question: why? What's the better spelling of operator.add?
>
> +
But that's not a function you can pass around,
whereas bool and abs are.
--
Greg
___
Python-3
Vladimir 'Yu' Stepanov wrote:
> -
> for i in xrange(100): pass
> vs.
> for i in int[:100]: pass
> -
I'm a strong -1 on this; it makes it look like float[:100] should also
be legal and reasonable
14 matches
Mail list logo