[Python-ideas] Re: Skip modules by default in star-import

2019-09-18 Thread Serhiy Storchaka
26.07.19 20:43, Serhiy Storchaka пише: I propose to change the rule for determining the set of public names if `__all__` is not defined. In addition to underscored names I propose to exclude names of modules. Opened an issue and a PR: https://bugs.python.org/issue38215 https://github.com/pyth

[Python-ideas] Add a slot for "keys" in tp_as_mapping

2019-09-18 Thread Serhiy Storchaka
Most C API uses type slots instead looking up in the type's dictionary for methods. But there are few methods used in basic operations which do not have corresponding slots. For example "keys", "__trunc__" and "__length_hint__". In particularly, "keys" is checked in dict.__init__() and dict.up

[Python-ideas] Re: Simpler syntax for async generators

2019-09-18 Thread Kyle Stanley
Steven D'Aprano wrote: > The interpreter should infer that a plain `def` function is actually an `async def` from the presence of `async yield`, similar to the way the interpreter infers that a plain `def` function is actually a generator from the presence of a `yield`. I would have to strongly di

[Python-ideas] Re: Simpler syntax for async generators

2019-09-18 Thread Kyle Stanley
George Fischoff wrote: > So when the default is async, the user will get faster program, by default. Chris Angelico wrote: > Okay, well that's the problem. An async function won't yield the values faster, and it will not allow two things to happen simultaneously. It just allows I/O and other such

[Python-ideas] Re: Skip modules by default in star-import

2019-09-18 Thread Christopher Barker
On Wed, Sep 18, 2019 at 9:04 AM Serhiy Storchaka wrote: > 26.07.19 20:43, Serhiy Storchaka пише: > > I propose to change the rule for determining the set of public names if > > `__all__` is not defined. In addition to underscored names I propose to > > exclude names of modules. I like this — bu

[Python-ideas] Re: Need a core developer sponsor for a PEP

2019-09-18 Thread Chris Angelico
On Tue, Sep 17, 2019 at 4:55 PM Philippe Prados wrote: > > Hello, > > I would like to publish a new PEP (see here). > I discussed this idea here. > The PEP1 explains that I must have a sponsor. > > Who can help me ? > With the blessing of the Python Steering Council, I am now your PEP's sponsor.

[Python-ideas] Set operations with Lists

2019-09-18 Thread Richard Higginbotham
I'm not sure if there is any interest by others but I have frequently come across cases where I would like to compare items in one list in another similar to relational algebra. For example are the file names in A in B and if so return a new list with those items. Long story short, I wrote some

[Python-ideas] Re: Set operations with Lists

2019-09-18 Thread Chris Angelico
On Thu, Sep 19, 2019 at 3:08 PM Richard Higginbotham wrote: > > I'm not sure if there is any interest by others but I have frequently come > across cases where I would like to compare items in one list in another > similar to relational algebra. For example are the file names in A in B and > if