Re: [Python-Dev] Please reconsider PEP 479.

2014-11-27 Thread Nick Coghlan
On 27 November 2014 at 11:15, Guido van Rossum gu...@python.org wrote: On Wed, Nov 26, 2014 at 2:53 PM, Nick Coghlan ncogh...@gmail.com wrote: On 27 Nov 2014 06:35, Guido van Rossum gu...@python.org wrote: [...] I think we can put a number to much faster now -- 150 nsec per try/except.

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-27 Thread Nick Coghlan
On 27 November 2014 at 09:50, Guido van Rossum gu...@python.org wrote: On Wed, Nov 26, 2014 at 3:15 PM, Nick Coghlan ncogh...@gmail.com wrote: This is actually the second iteration of this bug: the original implementation *always* suppressed StopIteration. PJE caught that one before Python 2.5

[Python-Dev] Strange help(int.__lt__). Probably documentation bug

2014-11-27 Thread Jesus Cea
http://bugs.python.org/issue20530#msg231584 -- Jesús Cea Avión _/_/ _/_/_/_/_/_/ j...@jcea.es - http://www.jcea.es/ _/_/_/_/ _/_/_/_/ _/_/ Twitter: @jcea_/_/_/_/ _/_/_/_/_/ jabber / xmpp:j...@jabber.org _/_/

Re: [Python-Dev] Strange help(int.__lt__). Probably documentation bug

2014-11-27 Thread Victor Stinner
2014-11-27 13:28 GMT+01:00 Jesus Cea j...@jcea.es: http://bugs.python.org/issue20530#msg231584 Copy/paste of the message: Preparing a presentation about Python Magic methods I found something weird: (Python 3.4) help(int.__lt__) Help on wrapper_descriptor: __lt__(self, value, /) - THIS!!

Re: [Python-Dev] Strange help(int.__lt__). Probably documentation bug

2014-11-27 Thread Victor Stinner
2014-11-27 13:41 GMT+01:00 Victor Stinner victor.stin...@gmail.com: 2014-11-27 13:28 GMT+01:00 Jesus Cea j...@jcea.es: http://bugs.python.org/issue20530#msg231584 Copy/paste of the message: Preparing a presentation about Python Magic methods I found something weird: (Python 3.4)

Re: [Python-Dev] Strange help(int.__lt__). Probably documentation bug

2014-11-27 Thread Victor Stinner
2014-11-27 13:41 GMT+01:00 Victor Stinner victor.stin...@gmail.com: I am amused about the /) suffix in the signature. It happens to all magic methods. If I remember correctly, it means that the function does not accept keywords: (3).__lt__(4) True (3).__lt__(value=4) Traceback (most recent

Re: [Python-Dev] Strange help(int.__lt__). Probably documentation bug

2014-11-27 Thread Jesus Cea
On 27/11/14 13:42, Victor Stinner wrote: 2014-11-27 13:41 GMT+01:00 Victor Stinner victor.stin...@gmail.com: I am amused about the /) suffix in the signature. It happens to all magic methods. If I remember correctly, it means that the function does not accept keywords: I don't understand.

Re: [Python-Dev] Strange help(int.__lt__). Probably documentation bug

2014-11-27 Thread Nick Coghlan
On 27 November 2014 at 23:43, Jesus Cea j...@jcea.es wrote: On 27/11/14 13:42, Victor Stinner wrote: 2014-11-27 13:41 GMT+01:00 Victor Stinner victor.stin...@gmail.com: I am amused about the /) suffix in the signature. It happens to all magic methods. If I remember correctly, it means that

Re: [Python-Dev] Please reconsider PEP 479.

2014-11-27 Thread Guido van Rossum
On Thu, Nov 27, 2014 at 3:04 AM, Nick Coghlan ncogh...@gmail.com wrote: On 27 November 2014 at 11:15, Guido van Rossum gu...@python.org wrote: On Wed, Nov 26, 2014 at 2:53 PM, Nick Coghlan ncogh...@gmail.com wrote: On 27 Nov 2014 06:35, Guido van Rossum gu...@python.org wrote: [...]

[Python-Dev] PEP 479 and asyncio

2014-11-27 Thread Victor Stinner
Hi, I'm trying to follow the discussion about the PEP 479 (Change StopIteration handling inside generators), but it's hard to read all messages. I'm concerned by trollius and asyncio which heavily rely on StopIteration. Trollius currently supports running asyncio coroutines: a trollius coroutine

Re: [Python-Dev] PEP 479 and asyncio

2014-11-27 Thread Guido van Rossum
On Thu, Nov 27, 2014 at 10:08 AM, Victor Stinner victor.stin...@gmail.com wrote: I'm trying to follow the discussion about the PEP 479 (Change StopIteration handling inside generators), but it's hard to read all messages. I'm concerned by trollius and asyncio which heavily rely on

Re: [Python-Dev] PEP 479 and asyncio

2014-11-27 Thread Victor Stinner
2014-11-27 20:06 GMT+01:00 Guido van Rossum gu...@python.org: The issue here is that asyncio only interprets StopIteration as returning from the generator (with a possible value), I'm not sure that the issue is directly related to asyncio. trollius_coro() raises a StopIteration to return the

Re: [Python-Dev] PEP 479 and asyncio

2014-11-27 Thread Victor Stinner
2014-11-27 22:54 GMT+01:00 Victor Stinner victor.stin...@gmail.com: I don't see how it would work. If it cannot be fixed, would it make sense to allow trollius to continue to work as it currently works with something like from __past__ import generator_dont_stop? When I talked with a friend

Re: [Python-Dev] PEP 479 and asyncio

2014-11-27 Thread Chris Angelico
On Fri, Nov 28, 2014 at 8:54 AM, Victor Stinner victor.stin...@gmail.com wrote: def return_value(value): if 0: yield raise Return(value) This is one known significant backward-incompatibility issue with this PEP - it'll be difficult to make this work on Python 2.7, where

Re: [Python-Dev] Please reconsider PEP 479.

2014-11-27 Thread Nick Coghlan
On 28 November 2014 at 02:52, Guido van Rossum gu...@python.org wrote: On Thu, Nov 27, 2014 at 3:04 AM, Nick Coghlan ncogh...@gmail.com wrote: If compatibility with older Python versions is needed, then you could put something like the following in a compatibility module: try:

Re: [Python-Dev] PEP 479 and asyncio

2014-11-27 Thread Nick Coghlan
On 28 November 2014 at 08:09, Victor Stinner victor.stin...@gmail.com wrote: 2014-11-27 22:54 GMT+01:00 Victor Stinner victor.stin...@gmail.com: I don't see how it would work. If it cannot be fixed, would it make sense to allow trollius to continue to work as it currently works with something