[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is as expected. As I said, since this isn't a bug in Python, this is not the appropriate place to discuss your problem. I suggest python-tutors list, but there are many other places to learn about python global and local variables. -- compo

[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Iuliana Netoi
Iuliana Netoi added the comment: Now I wrote the same list named my_list inside the function. And I deleted the function argument.When running again and again, the function remains as I defined it. So the console behavior depends on the list placing: before or inside the function. When the li

[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed that this is a misunderstanding and not a bug. iuliananet: you're modifying the same list each time you're calling problem2_2(). You might look for help on the python-tutors mailing list: https://mail.python.org/mailman/listinfo/tutor -- nosy:

[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Shane
Shane added the comment: I suspect the author simply does not realize lists are mutable in Python. -- nosy: +Shane Smith ___ Python tracker ___ ___

[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't understand what you think is the bug. You keep repeatedly appending 'z' to the same list. Why are you surprised that it appends 'z' more than once? If you don't want to append it twice, don't call the function twice. Every time you call the function

[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Iuliana Netoi
Change by Iuliana Netoi : -- type: -> behavior Added file: https://bugs.python.org/file47934/tema_2-2-PT-PYTHON--TRACKER-text.txt ___ Python tracker ___ _

[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Iuliana Netoi
New submission from Iuliana Netoi : While running a function that uses a list to which I append the element "z", the Console modifies my code by adding "z" to the list each time I consequently run the function. Is that a bug? My function written in the Editor of Python 3.7.0. is the followi