Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-30 Thread Paul Sokolovsky
Hello, On Tue, 28 Apr 2015 21:00:17 +0100 Mark Shannon wrote: [] > >> CO_COROUTINE = 0x0080 > >> CO_GENERATOR = 0x0020 > >> > >> def coroutine(f): > >> 'Converts a function to a generator function' > >> old_code = f.__code__ > >> new_code = CodeType( > >> old_code.co

Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-30 Thread Paul Sokolovsky
Hello, On Tue, 28 Apr 2015 19:44:53 +0100 Mark Shannon wrote: [] > A coroutine without a yield statement can be defined simply and > concisely, thus: > > @coroutine > def f(): > return 1 [] > A pure-python definition of the "coroutine" decorator is > given below. > [] > from types i

Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-28 Thread Guido van Rossum
On Tue, Apr 28, 2015 at 1:22 PM, Mark Shannon wrote: > > > On 28/04/15 21:06, Guido van Rossum wrote: > >> On Tue, Apr 28, 2015 at 11:44 AM, Mark Shannon > > wrote: >> >> Hi, >> >> I still think that there are several issues that need addressing >> with PEP 492.

Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-28 Thread Mark Shannon
On 28/04/15 21:06, Guido van Rossum wrote: On Tue, Apr 28, 2015 at 11:44 AM, Mark Shannon mailto:m...@hotpy.org>> wrote: Hi, I still think that there are several issues that need addressing with PEP 492. This time, one issue at a time :) "async" The "Rationale and Goals"

Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-28 Thread Guido van Rossum
On Tue, Apr 28, 2015 at 11:44 AM, Mark Shannon wrote: > Hi, > > I still think that there are several issues that need addressing with PEP > 492. This time, one issue at a time :) > > "async" > > The "Rationale and Goals" of PEP 492 states that PEP 380 has 3 > shortcomings. > The second of which i

Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-28 Thread Mark Shannon
On 28/04/15 20:39, Paul Sokolovsky wrote: Hello, On Tue, 28 Apr 2015 19:44:53 +0100 Mark Shannon wrote: [] A coroutine without a yield statement can be defined simply and concisely, thus: @coroutine def f(): return 1 [] A pure-python definition of the "coroutine" decorator is gi

Re: [Python-Dev] Issues with PEP 482 (1)

2015-04-28 Thread Yury Selivanov
Mark, I'm sorry but you have to view the proposal as a whole. Discussing it point by point in isolation doesn't make any sense, as with any complex subject. Thanks, Yury On 2015-04-28 2:44 PM, Mark Shannon wrote: Hi, I still think that there are several issues that need addressing with PE

[Python-Dev] Issues with PEP 482 (1)

2015-04-28 Thread Mark Shannon
Hi, I still think that there are several issues that need addressing with PEP 492. This time, one issue at a time :) "async" The "Rationale and Goals" of PEP 492 states that PEP 380 has 3 shortcomings. The second of which is: """It is not possible to natively define a coroutine which has