[New-bugs-announce] [issue35910] Curious problem with my choice of variables

Phil Dream report at bugs.python.org
Wed Feb 6 05:03:18 EST 2019


New submission from Phil Dream <philsdream at gmail.com>:

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 <report at bugs.python.org>
<https://bugs.python.org/issue35910>
_______________________________________


More information about the New-bugs-announce mailing list