A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-September/017400.html below:

[Python-Dev] Profiling of generators broken

[Python-Dev] Profiling of generators broken [Python-Dev] Profiling of generators brokenGuido van Rossum guido@python.org
Tue, 04 Sep 2001 14:28:46 -0400
> Here's a simple test:
> 
>     from __future__ import generators
> 
>     def test():
>         yield 1
>         yield 2
> 
>     import profile
>     profile.run("list(test())")
> 
> It looks like the profile module is getting confused by functions that
> get called once but return multiple times.  My proposed solution is to
> modify ceval.c so that call_trace(..., PyTrace_CALL, ...) is called
> when a generator is resumed rather then when it is created.  Sound
> reasonable?

Yes.  (Caveat: I haven't looked at the code.)

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4