New submission from Gerrit Barrere:

The bug occurs on line 77 of the attached script. When I change the imaginary 
part of 'z' on line 77, it also changes the imaginary part of 'zload', which is 
supposed to remain constant.  Putting a dummy assignment 'z = z + 0' on line 76 
fixes the bug.  This is all described in the comments around line 77 also.

I found this in the PyCharm IDE by putting a breakpoint just after line 77 and 
watching variables 'z' and 'zload'.  The function 'model()' is called 
repeatedly in this script, and you can see 'zload' changing every time the 
function is called.

----------
files: ComplexBug.py
messages: 234631
nosy: CarpeCimex
priority: normal
severity: normal
status: open
title: Wrong complex variable being altered
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file37839/ComplexBug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23313>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to