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

List comprehension problem #256

Open
zwedwin opened this issue Nov 9, 2022 · 5 comments
Open

List comprehension problem #256

zwedwin opened this issue Nov 9, 2022 · 5 comments

Comments

@zwedwin
Copy link

zwedwin commented Nov 9, 2022

While using IPython import embed; embed() in an ipdb session list comprehensions seem to have a broken scope, take the snippet as an example. Confirmed this is not an IPython issue.
image (41)

@zwedwin
Copy link
Author

zwedwin commented Nov 9, 2022

Normal IPython output, outside of an ipdb session
image

@gotcha
Copy link
Owner

gotcha commented Dec 13, 2022

What do you mean by an ipdb session ?

Can you describe how you start it ?

@zwedwin
Copy link
Author

zwedwin commented Dec 19, 2022

Ill be a bit pedantic for clarity:
import ipdb; ipdb.set_trace() somewhere in a python file as a breakpoint.
Run the file, now were in a ipdb "session" (at least thats what I mean by session)

Run this from the cli
from IPython import embed
embed()

Then you should be able to reproduce the error in the resulting "embeded" ipython session.

@gotcha
Copy link
Owner

gotcha commented Dec 20, 2022

@zwedwin Thanks for the clarification. It helps to reproduce the issue.

And sorry to ask for pedantic explanations: as the README mentions, there are various ways to use ipdb.

@zwedwin
Copy link
Author

zwedwin commented Jan 5, 2023

No worries! thanks for looking into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants