Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Ron Adam
On 08/26/2010 07:25 PM, Guido van Rossum wrote: That's not my experience. I wrote a trampoline myself (not released yet), and found that I had to write a lot more code to deal with the absence of yield-from than to deal with returns. In my framework, users write 'raise Return(value)' where Retu

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Bob Ippolito
On Fri, Aug 27, 2010 at 8:25 AM, Guido van Rossum wrote: > On Thu, Aug 26, 2010 at 5:05 PM, Yury Selivanov wrote: >> On 2010-08-26, at 8:04 PM, Greg Ewing wrote: >>> Even with your proposal, you'd still have to use a 'creepy >>> abstraction' every time one of your coroutines calls another. >>> Th

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Yury Selivanov
On 2010-08-26, at 1:10 PM, Eric Smith wrote: > On 8/26/10 12:48 PM, Yury Selivanov wrote: >> On 2010-08-26, at 12:20 PM, Scott Dial wrote: >>> BTW, attaching patches to >>> emails on this list is generally the best way to have few look at your >>> patch. :-p >> >> Hm, my mailing client clearly in

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Yury Selivanov
On 2010-08-26, at 8:25 PM, Guido van Rossum wrote: > On Thu, Aug 26, 2010 at 5:05 PM, Yury Selivanov wrote: >> On 2010-08-26, at 8:04 PM, Greg Ewing wrote: >>> Even with your proposal, you'd still have to use a 'creepy >>> abstraction' every time one of your coroutines calls another. >>> That's w

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Eric Smith
On 8/26/10 12:48 PM, Yury Selivanov wrote: On 2010-08-26, at 12:20 PM, Scott Dial wrote: BTW, attaching patches to emails on this list is generally the best way to have few look at your patch. :-p Hm, my mailing client clearly indicates that the patch has been attached and sent. In any case,

Re: [Python-Dev] Update Shell profile for ZSH on Mac OS

2010-08-26 Thread Ned Deily
In article <1f312497-c55f-4e0b-bd58-1c249416f...@gmail.com>, Sylvain Mora wrote: > Is it possible to know the name of the macos package maintainer ? Ronald Oussoren. If you select Components -> Macintosh in the bug tracker when opening a new bug it will be assigned automatically; if not, some

Re: [Python-Dev] Update Shell profile for ZSH on Mac OS

2010-08-26 Thread Éric Araujo
Hi Sylvain > Sorry for errors in the e-mail and the patch, but i'm french student Being polite or cautious is a good thing in Internet communication, but you don’t have to apologize about that. Everyone tries to express themselves as clearly as possible, but nobody is judged because of language.

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Guido van Rossum
On Thu, Aug 26, 2010 at 5:05 PM, Yury Selivanov wrote: > On 2010-08-26, at 8:04 PM, Greg Ewing wrote: >> Even with your proposal, you'd still have to use a 'creepy >> abstraction' every time one of your coroutines calls another. >> That's why PEP 380 deals with 'more than just return'. > > Nope.  

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Yury Selivanov
On 2010-08-26, at 8:04 PM, Greg Ewing wrote: > Even with your proposal, you'd still have to use a 'creepy > abstraction' every time one of your coroutines calls another. > That's why PEP 380 deals with 'more than just return'. Nope. In almost any coroutine framework you have a scheduler or trampo

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Greg Ewing
Yury Selivanov wrote: However, as I outlined in the first message, this was intended to prevent this kind of mistakes: ... def test(): ... for i in range(10): ... yield i ... return 10 Which will certainly happen, especially with people new to python. That very problem was co

Re: [Python-Dev] Update Shell profile for ZSH on Mac OS

2010-08-26 Thread Sylvain Mora
Hi, Is it possible to know the name of the macos package maintainer ? Regards, Sylvain Le 27 août 2010 à 00:40, Sylvain Mora a écrit : > > Le 26 août 2010 à 23:20, Brett Cannon a écrit : > >> If you could, Sylvain, please post the patch to bugs.python.org. That >> way it doesn't get lost amon

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Nick Coghlan
On Fri, Aug 27, 2010 at 8:31 AM, Yury Selivanov wrote: > All this proposal is suggesting is to replace SyntaxError with > GeneratorReturn (or StopIteration).  I'd classify is as a minor change > than some special refactoring that may fall under the moratorium.  Correct > me if I'm wrong. It's eit

Re: [Python-Dev] Update Shell profile for ZSH on Mac OS

2010-08-26 Thread Sylvain Mora
Le 26 août 2010 à 23:20, Brett Cannon a écrit : > If you could, Sylvain, please post the patch to bugs.python.org. That > way it doesn't get lost amongst the emails sent to python-dev. > > -Brett Hi, Thank you for you answer. I will post the patch to bugs.python.org. Regards, Sylvain ___

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Yury Selivanov
On 2010-08-26, at 6:11 PM, Nick Coghlan wrote: > On Fri, Aug 27, 2010 at 1:00 AM, Yury Selivanov wrote: >> In the above, GeneratorReturn error will be propagated stopping the program >> execution. >> Strictly speaking, the proposed change is just alters the current Python >> behaviour, >> makin

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Nick Coghlan
On Fri, Aug 27, 2010 at 1:00 AM, Yury Selivanov wrote: > In the above, GeneratorReturn error will be propagated stopping the program > execution. > Strictly speaking, the proposed change is just alters the current Python > behaviour, > making the 'return value' statement raise catchable error (i

Re: [Python-Dev] Update Shell profile for ZSH on Mac OS

2010-08-26 Thread Brett Cannon
If you could, Sylvain, please post the patch to bugs.python.org. That way it doesn't get lost amongst the emails sent to python-dev. -Brett On Thu, Aug 26, 2010 at 05:37, Sylvain Mora wrote: > Hi, > > I use python for more than a year now and i bought a MacBook in July. I > installed Python 2.7

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Yury Selivanov
On 2010-08-26, at 12:20 PM, Scott Dial wrote: > On 8/26/2010 11:00 AM, Yury Selivanov wrote: >> If we decide to postpone this feature till Python 3.3, than we'll push it >> all back >> The change is tiny, but it means really a lot. > > AFAICT, this change was the most controversial part of PEP 3

Re: [Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Scott Dial
On 8/26/2010 11:00 AM, Yury Selivanov wrote: > If we decide to postpone this feature till Python 3.3, than we'll push it all > back > The change is tiny, but it means really a lot. AFAICT, this change was the most controversial part of PEP 380. > PS I'm attaching a patch to the letter; it's far

[Python-Dev] Return from generators in Python 3.2

2010-08-26 Thread Yury Selivanov
Hello, I want to bring up a "forbidden" topic, however, I believe I have some strong points. There are many ways of doing asynchronous programming in Python. Multiprocessing, Threads, Greenlets, Deferred Object (Callbacks) and Coroutines. The latter is quite a new approach, but it gets mor

[Python-Dev] Update Shell profile for ZSH on Mac OS

2010-08-26 Thread Sylvain Mora
Hi, I use python for more than a year now and i bought a MacBook in July. I installed Python 2.7 using the .dmg archive on the official website. After the installation I launched the Update Shell Profile.command script, but it doesn't work with ZSH. That's why I have write a small patch to be a

Re: [Python-Dev] Fwd: i18n

2010-08-26 Thread Anders J. Munch
Terry Reedy wrote: > Localized messages should be in addition to rather than a replacement > for the English version. I thought we had this discussion somewhere -- > here? ideas? maybe a tracker issue? This could be done as a free-standing library, there's no reason to involve core CPython. Just