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

Better del support #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Better del support #37

wants to merge 1 commit into from

Conversation

jayvdb
Copy link
Member

@jayvdb jayvdb commented Nov 2, 2015

Detect Python 3.2 and lower SyntaxError for deleting
variable referenced in nested scope.

Detect Python 3.2 and lower SyntaxError for deleting
variable referenced in nested scope.
@jayvdb
Copy link
Member Author

jayvdb commented Nov 2, 2015

Still needs a bit of polish, but I'd like confirmation that I am not wasting my time before proceeding with the current strategy.

A real world case is https://hg.python.org/cpython/file/tip/Lib/opcode.py

This would likely solve the original bug report in https://bugs.launchpad.net/pyflakes/+bug/1308508 .

(And https://bugs.launchpad.net/pyflakes/+bug/1461208 should be looked at as part of this)

The DoctestScope could be pulled out to be a separate changeset (or an alternative workaround found). There are related bugs which could be solved as part of this; e.g. https://bugs.launchpad.net/pyflakes/+bug/1178807

I need to see whether the assignment checks can also be un-deferred, as that would reduce the amount of code restructure required to support del properly.

handler, scope, offset = record
else:
handler, scope, offset, node = record
if node:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if node is not None?

@jayvdb jayvdb mentioned this pull request Nov 4, 2015
@bitglue
Copy link
Member

bitglue commented Nov 12, 2015

Does this need a refresh after those other two PRs were split off?

@jayvdb
Copy link
Member Author

jayvdb commented Nov 12, 2015

It certainly will need to be freshened, and a bit of polish.

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

Successfully merging this pull request may close these issues.

None yet

3 participants