Ron Adam wrote:
I wonder if "yield from" may run into pythons stack limit?
My current implementation wouldn't, because nested yield-froms
don't result in nested activations of Python frames. But...
if __name__ == "__main__":
print(factoral(1)) # < extra zero too!
But if I add
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
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
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
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
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,
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.
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
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
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
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
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
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
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
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
15 matches
Mail list logo