[issue9855] Complex number slicing neither works nor causes an error on immediate use

2010-09-14 Thread Tom
Tom added the comment: Thanks! I'm not surprised that it was something stupidofme like that. Sorry to have troubled you. :) -- ___ Python tracker ___ _

[issue9855] Complex number slicing neither works nor causes an error on immediate use

2010-09-14 Thread Eric Smith
Eric Smith added the comment: The precedence doesn't work the way you think it does. Your example with the intermediate variable is the same as: >>> ((0+1j)*(0+1j)).imag 0.0 >>> ((0+1j)*(0+1j)).real -1.0 Note the extra level of parens so that .imag and .real are applied to the result of the

[issue9855] Complex number slicing neither works nor causes an error on immediate use

2010-09-14 Thread Tom
New submission from Tom : I hope the title of this makes sense. I've been out of things for a long time. Going through the Python tutorial (http://docs.python.org/tutorial/introduction.html) I departed from the script to try something. It gave neither of the results I had thought it might.