[issue31688] scope error

2017-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Abdullah, in the future, please upload or post runnable Python code, not an image. Output can be copied into a message. If you think IDLE is doing something wrong, test by running the code directly with Python. If your file is test.py, enter the following

[issue31688] scope error

2017-10-04 Thread R. David Murray
R. David Murray added the comment: Yes, this conforms to Python's namespace/scoping rules: nested scopes are allowed to reference (but not assign to) variables from the global scope even without a 'global' declaration. -- nosy: +r.david.murray resolution: -> not a bug stage: -> reso

[issue31688] scope error

2017-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: The code looks fine to me; I don't see any reason to expect an error. What error were you expecting, and why? -- nosy: +mark.dickinson ___ Python tracker ___

[issue31688] scope error

2017-10-04 Thread abdullah patel
New submission from abdullah patel : there should be an error when this code is run. as I have not defined the arguments (I was told by my computer science teacher that it should not work in theory) and parameters but it clearly works. -- assignee: terry.reedy components: IDLE files: