Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-22 Thread Carl Smith
I thought this thread did a good job of establishing that looking at other languages is not going to help with introducing assignment expressions into Python. It was still interesting to read. If we can't copy from other languages (or even agree on *which* languages to copy), Python will have to d

[Python-ideas] Make asyncio.get_event_loop a builtin

2018-05-22 Thread Ken Hilton
Hi all, Just a simple idea I wanted to bring forth. Although I know that you get a lot more asyncio control by importing the asyncio module itself, I'd like to see a way to make simple asynchronous applications without ever importing asyncio itself. To that end, I propose making asyncio.get_event_

Re: [Python-ideas] Allow multiple imports from a package while preserving its namespace

2018-05-22 Thread Julian DeMille via Python-ideas
The fact of explicit dependency noting is why I suggested something that explicitly defines multiple imports in one line On Sat, Apr 28, 2018 at 9:28 PM Greg Ewing wrote: > Nick Coghlan wrote: > > I find the imports at the top of the file to be a nice > > catalog of external dependencies. > > No

Re: [Python-ideas] Make asyncio.get_event_loop a builtin

2018-05-22 Thread Terry Reedy
On 5/22/2018 5:21 AM, Ken Hilton wrote: Hi all, Just a simple idea I wanted to bring forth. Although I know that you get a lot more asyncio control by importing the asyncio module itself, I'd like to see a way to make simple asynchronous applications without ever importing asyncio itself. To

Re: [Python-ideas] Make asyncio.get_event_loop a builtin

2018-05-22 Thread Yury Selivanov
On Tue, May 22, 2018 at 2:09 PM Terry Reedy wrote: [..] > I like the idea of making coroutines easier and use. It would make more > sense to me to expose an eventloop class as a builtin, so that one would > write > eventloop().run_until_complete(hello) > eventloop would not necessarily have to

Re: [Python-ideas] Modern language design survey for "assign and compare" statements

2018-05-22 Thread Julien Salort
Le 20/05/2018 à 03:43, Steven D'Aprano a écrit : I've somewhat arbitrarily cut the list off at "languages ranked above 1% on TIOBE", but we have to cut the list of somewhere. And of course in certain specific industries the standard languages may be very different, e.g. there are still tens of m

[Python-ideas] Meta-PEP about built-in functions

2018-05-22 Thread Jeroen Demeyer
Hello, Both PEP 573 and PEP 575 deal with built-in functions. Additionally, some people (Stefan Behnel, Robert Bradshaw, Jim Pivarski and me) are currently brainstorming about a yet-to-be-written PEP to allow calling the underlying C function of a built-in function using native types (for exa

[Python-ideas] "Assignment expression" with function call-alike syntax

2018-05-22 Thread Kirill Balunov
Just one more variation on "assignment exression" syntax to make the list more complete :) Sorry, if something similar has already been suggested. The idea is to use function's call-like syntax in the from: `this( name = expr )`. I'm not sure that such idea will find its supporters and whether it i

Re: [Python-ideas] Make asyncio.get_event_loop a builtin

2018-05-22 Thread Chris Barker via Python-ideas
>>To that end, I propose making asyncio.get_event_loop() a builtin. I like the idea of making coroutines easier and use. I do too, but ... > > Eventloop could have an .__init__ method, or be a factory function, with a > 'loop' parameter. The value specifies which eventloop implementation > a

Re: [Python-ideas] Meta-PEP about built-in functions

2018-05-22 Thread Guido van Rossum
This sounds fine to me. For type hint s we did a similar thing with PEPs 482, 483 and 484. You probably want to make everyone involved a co-author. On Tue, May 22, 2018, 14:29 Jeroen Demeyer wrote: > Hello, > > Both PEP 573 and PEP 575 deal with built-in functions. Additionally, > some people (S

Re: [Python-ideas] "Assignment expression" with function call-alike syntax

2018-05-22 Thread Terry Reedy
On 5/22/2018 5:32 PM, Kirill Balunov wrote: Just one more variation on "assignment exression" syntax to make the list more complete :) Sorry, if something similar has already been suggested. The idea is to use function's call-like syntax in the from: `this( name = expr )`. Functions names sho