The del statement has no effect
See original GitHub issueFrom the Brython console:
Brython 3.7.0 on Netscape 5.0 (Windows)
>>> v
NameError: name 'v' is not defined
Traceback (most recent call last):
module __main__ line 129, in myKeyPress
_ = editor_ns['_'] = eval(currentLine, editor_ns)
module <module> line 1
v
>>> v = 1
>>> v
1
>>> del v
>>> v
1
But after del v
accessing v
should raise a NameError
again.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Statement has no effect — CodeQL query help documentation
An expression statement without side effects is just clutter. It confuses the reader and may have a slight impact on performance. Recommendation¶. First ......
Read more >Unable to remove object after using del statement in python
For this, all I would have to do say del root. This has no effect at all on the tree and the value...
Read more >MSC12-C. Detect and remove code that has no effect
Code that has no effect or is never executed (that is, dead or unreachable code) is typically the result of a coding error...
Read more >Statement seems to have no effect
The message "statement seems to have no effect" is being shown as an allert for the syntax checking in PyCharm. I want to...
Read more >7. Simple statements — Python 3.11.1 documentation
A simple statement is comprised within a single logical line. Several simple statements may occur on a single line separated by semicolons.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My mistake, sorry : when I tested your example I removed the parenthesis:
instead of
and the bug happened with the parenthesis.
Thanks for the report !
To be fair, before suspecting Chromium, I’ll try the javascript equivalent of Python’s del(). What javascript equivalent does Brython use for del()?