Re: [Python-ideas] Why CPython is still behind in performance for some widely used patterns ?

2018-02-19 Thread Antoine Pitrou
On Mon, 19 Feb 2018 20:15:27 +0100 Stefan Behnel wrote: > Nick Coghlan schrieb am 02.02.2018 um 06:47: > > to make the various extension module authoring tools > > easier to discover, rather than having folks assuming that handcrafted > > calls directly into the CPython C API

Re: [Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

2018-02-19 Thread Stephen J. Turnbull
Guido van Rossum writes: > Hm, perhaps Integral is an adjective, just like Boolean? I would guess so. This is the same idiom we use when we call [1, 2, 3] a "truth-y". ___ Python-ideas mailing list Python-ideas@python.org

Re: [Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

2018-02-19 Thread Nick Coghlan
On 20 February 2018 at 08:33, Guido van Rossum wrote: > Hm, perhaps Integral is an adjective, just like Boolean? Though it's also > possible that it was simply a mistake. In general I don't like adding > aliases for different spellings -- it violates TOOWTDI. If we decide that >

Re: [Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

2018-02-19 Thread Guido van Rossum
On Mon, Feb 19, 2018 at 5:58 AM, Sylvain MARIE < sylvain.ma...@schneider-electric.com> wrote: > > A thought just occurred to me. Maybe we should just add a Boolean class > to numbers? > > That would be great indeed > > > It's a subclass of Integral, presumably. And normally only builtins.bool >

Re: [Python-ideas] PEP 468

2018-02-19 Thread Brett Cannon
FYI I have unsubscribed this person from the mailing list. If they persist to send empty emails I will figure out how to block them. On Sun, 18 Feb 2018 at 22:04 guido wrote: > > > > > Gesendet von Mail für > Windows 10 > >

Re: [Python-ideas] Why CPython is still behind in performance for some widely used patterns ?

2018-02-19 Thread Stefan Behnel
Nick Coghlan schrieb am 02.02.2018 um 06:47: > to make the various extension module authoring tools > easier to discover, rather than having folks assuming that handcrafted > calls directly into the CPython C API is their only option. Or even a competitive option. Tools like Cython or pybind11 go

Re: [Python-ideas] Coming up with an alternative to PEP 505's None-aware operators

2018-02-19 Thread David Foster
(1) This proposal serves well to eliminate repeated computations by allowing what is an inline assignment to a temporary variable. But it doesn't seem to make the case of None-aware operators any less verbose than they would be otherwise. Proposal: value = ?it.strip()[4:].upper() if

Re: [Python-ideas] Coming up with an alternative to PEP 505's None-aware operators

2018-02-19 Thread Ethan Furman
On 02/18/2018 05:57 PM, Nick Coghlan wrote: On 17 February 2018 at 02:31, Ethan Furman wrote: On 02/15/2018 11:55 PM, Nick Coghlan wrote: However, while I think that looks nicer in general, we'd still have to choose between two surprising behaviours: * implicitly delete the statement locals

Re: [Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

2018-02-19 Thread Serhiy Storchaka
15.02.18 18:27, Guido van Rossum пише: A thought just occurred to me. Maybe we should just add a Boolean class to numbers? It's a subclass of Integral, presumably. Isn't bool a subclass of int only for historical reasons? I think that if bool was in Python from the beginning, it would not be

Re: [Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module

2018-02-19 Thread Sylvain MARIE
> A thought just occurred to me. Maybe we should just add a Boolean class to > numbers? That would be great indeed > It's a subclass of Integral, presumably. And normally only builtins.bool is > registered with it. But np.bool can be added at the same point you register > the other np