Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PDB] NameError in list comprehension in PDB #71503

Closed
DiaaJad mannequin opened this issue Jun 14, 2016 · 3 comments
Closed

[PDB] NameError in list comprehension in PDB #71503

DiaaJad mannequin opened this issue Jun 14, 2016 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@DiaaJad
Copy link
Mannequin

DiaaJad mannequin commented Jun 14, 2016

BPO 27316
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2016-06-14.14:53:27.817>
created_at = <Date 2016-06-14.07:40:48.406>
labels = ['type-bug', 'library']
title = '[PDB] NameError in list comprehension in PDB'
updated_at = <Date 2016-06-14.14:53:27.816>
user = 'https://bugs.python.org/DiaaJad'

bugs.python.org fields:

activity = <Date 2016-06-14.14:53:27.816>
actor = 'SilentGhost'
assignee = 'none'
closed = True
closed_date = <Date 2016-06-14.14:53:27.817>
closer = 'SilentGhost'
components = ['Library (Lib)']
creation = <Date 2016-06-14.07:40:48.406>
creator = 'Diaa Jad'
dependencies = []
files = []
hgrepos = []
issue_num = 27316
keywords = []
message_count = 3.0
messages = ['268539', '268542', '268561']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'SilentGhost', 'Diaa Jad']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27316'
versions = ['Python 3.4']

@DiaaJad DiaaJad mannequin added extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump stdlib Python modules in the Lib dir and removed extension-modules C modules in the Modules dir labels Jun 14, 2016
@DiaaJad
Copy link
Mannequin Author

DiaaJad mannequin commented Jun 14, 2016

This code fails in the python debugger:
(Pdb) z = True
(Pdb) p [x for x in [1,2] if z]
*** NameError: name 'z' is not defined

While the same code works in the interactive shell:
>>> [x for x in [1,2] if z]
[1, 2]

@SilentGhost SilentGhost mannequin added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Jun 14, 2016
@SilentGhost
Copy link
Mannequin

SilentGhost mannequin commented Jun 14, 2016

I cannot reproduce this issue on 3.5, do you have a chance to test this on a 3.5 or some other version of python? Also, could you provide any more details of your system?

@DiaaJad
Copy link
Mannequin Author

DiaaJad mannequin commented Jun 14, 2016

I actually drop to pdb from nosetests on test failure using --pdb option. I use a Fedora 23 machine.
Anyway, it looks like this issue is specific to the virtual environment we use at work that uses version 3.4.4, as I couldn't reproduce it on native 3.4 .
As this bug does not show up in the original release I think we can safely close the ticket and I will try to debug the issue locally.

@SilentGhost SilentGhost mannequin closed this as completed Jun 14, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants