[issue35910] Curious problem with my choice of variables
New submission from Phil Dream : Firstable I am not a software expert just a hobby user so please be indulgent I use a Raspberry Pi3B+ with raspbian lite and Python 3.5.3 In my script, I need 2 nested "while" loops so I chose two variables to incriment them 'i' and j. This script don't work and I made a certain time to understand (I did not think Python could play me a trick). I needed to reset 'j' to go through the inner loop a few times and in fact I realized that when I initialized 'j', 'i' was also initialized !?!? Very curious isn't it ? I replaced 'i' by 'y' and no more problem, my script works very well. -- files: sirext.py messages: 334913 nosy: Phil Dream priority: normal severity: normal status: open title: Curious problem with my choice of variables type: behavior versions: Python 3.5 Added file: https://bugs.python.org/file48104/sirext.py ___ Python tracker <https://bugs.python.org/issue35910> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35910] Curious problem with my choice of variables
Phil Dream added the comment: OK, I am sorry I didn’t know Best regards De : Stéphane Wirtel Envoyé le :mercredi 6 février 2019 11:10 À : philsdr...@gmail.com Objet :[issue35910] Curious problem with my choice of variables Stéphane Wirtel added the comment: Hi Phil, This bug tracker is more for the core-dev and the contributors of CPython. I suggest to you to use the right mailing list for your issues. or use #python-fr on freenode Mailing list: https://mail.python.org/mailman/listinfo/python-list I close this issue because it's not related to the internals of Python. -- nosy: +matrixise resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35910> ___ -- ___ Python tracker <https://bugs.python.org/issue35910> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35910] Curious problem with my choice of variables
Phil Dream added the comment: OK, I am sorry I didn’t know Thanks for the advice Best regards De : Rémi Lapeyre Envoyé le :mercredi 6 février 2019 11:07 À : philsdr...@gmail.com Objet :[issue35910] Curious problem with my choice of variables Rémi Lapeyre added the comment: Hi @Phil Dream, you reuse i in your inner loop, in the for statement. By the way, I suggest you look at range() to replace your while loop: https://docs.python.org/3/library/functions.html#func-range. For your others questions, the mailing list are more appropriate than the bug tracker. Have a nice day! -- nosy: +remi.lapeyre ___ Python tracker <https://bugs.python.org/issue35910> ___ -- ___ Python tracker <https://bugs.python.org/issue35910> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com