Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13604)

#17934: Add a frame method to clear expensive details

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 4 months ago by pitrou
Modified:
6 years, 1 month ago
Reviewers:
ncoghlan
CC:
gvanrossum, Nick Coghlan, AntoinePitrou, haypo, flox, devnull_psf.upfronthosting.co.za, eric.snow
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Total comments: 6

Patch Set 4 #

Patch Set 5 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/inspect.rst View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
Doc/reference/datamodel.rst View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
Include/frameobject.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
Include/genobject.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
Lib/test/test_frame.py View 1 2 3 4 1 chunk +113 lines, -0 lines 0 comments Download
Lib/test/test_sys.py View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
Lib/test/test_traceback.py View 1 2 3 4 2 chunks +15 lines, -1 line 0 comments Download
Objects/frameobject.c View 1 2 3 4 6 chunks +26 lines, -2 lines 0 comments Download
Objects/genobject.c View 1 2 3 4 4 chunks +5 lines, -3 lines 0 comments Download
Python/ceval.c View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2
Nick Coghlan
I like this version, just a docs suggestion and a bit more of a torture ...
6 years, 4 months ago #1
AntoinePitrou
6 years, 4 months ago #2
http://bugs.python.org/review/17934/diff/8144/Lib/test/test_frame.py
File Lib/test/test_frame.py (right):

http://bugs.python.org/review/17934/diff/8144/Lib/test/test_frame.py#newcode91
Lib/test/test_frame.py:91: next(gen)
On 2013/05/13 15:21:17, Nick Coghlan wrote:
> And then attempting to clear it while the generator is suspended to make sure
> that also raises RuntimeError.

It doesn't: same as calling close() on the generator.
I don't think it matters: the main use case for frame.clear() is to clear
traceback frames and, when a generator frame is caught in a traceback, it means
the frame exited because of an exception, not because of a yield.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+