Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Set line number on the POP_TOP that follows a RETURN_GENERATOR #109923

Closed
@iritkatriel

Description

@iritkatriel

Currently thePOP_TOP of a generator doesn't get a line number.
If we give it the same line number as theRETURN_GENERATOR andRESUME, that will reduce the size of the line number table.

The missing line number also got in my way while working on#109094.

>>> def f(): yield 42... >>> dis.dis(f)   1           0 RETURN_GENERATORNone           2 POP_TOP   1           4 RESUME                   0               6 LOAD_CONST               1 (42)               8 YIELD_VALUE              1              10 RESUME                   1              12 POP_TOP              14 RETURN_CONST             0 (None)None     >>   16 CALL_INTRINSIC_1         3 (INTRINSIC_STOPITERATION_ERROR)              18 RERAISE                  1ExceptionTable:  4 to 14 -> 16 [0] lasti

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp