GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PDB missing function arguments in list comprehension · Issue #123141 · python/cpython

PDB missing function arguments in list comprehension #123141

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
PDB missing function arguments in list comprehension#123141
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@LukasKapp-Schwoerer
LukasKapp-Schwoerer
opened on Aug 19, 2024
Issue body actions

Bug report

Bug description:

Description

If PDB is executed within a function trace and function argument arg is defined, executing [arg for _ in [0]] within PDB throws NameError: name 'arg' is not defined.

To reproduce

import pdb

def fun(t):
  print([t for _ in [0]])
  pdb.set_trace()

fun(42)

Execute the code until PDB breaks upon pdb.set_trace(). In PDB, executing t will return 42, but executing [t for _ in [0]] throws NameError: name 't' is not defined:

Log

[42]
--Return--
> /home/main.py(5)fun()->None
-> pdb.set_trace()
(Pdb) t
42
(Pdb) [t for _ in [0]]
*** NameError: name 't' is not defined

Tested locally on 3.11.9 and on https://www.onlinegdb.com/online_python_debugger.

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Activity

  1. LukasKapp-Schwoerer
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Aug 19, 2024
  2. gaogaotiantian commented on Aug 19, 2024

    @gaogaotiantian
    gaogaotiantian
    on Aug 19, 2024
    Member
    More actions

    dup #65360 and is fixed in main/3.13 by #111094. (PEP 709 accidentally fixed part of the issue so 3.12 works fine in this specific case as well).

  3. gaogaotiantian
    closed this as not plannedon Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.