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

2010-09-14 Thread Tom

New submission from Tom t...@littlemonster.co.uk:

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.

 (0+1j)*(0+1j).imag
1j
 (0+1j)*(0+1j).real
0j
 a=(0+1j)*(0+1j)
 a.imag
0.0
 a.real
-1.0
 

This being my first crack at this language, I may have missed something that is 
obvious to the more experienced.

In my naivety, I thought that slicing the result of a calculation should work - 
why not? It should have the same structure as that pointed to by a variable.

So I'll leave this for either somebody with the patience to put me straight or 
somebody to fix.

Cheers!

--
messages: 116409
nosy: LittleMonster
priority: normal
severity: normal
status: open
title: Complex number slicing neither works nor causes an error on immediate use
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9855
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-09-14 Thread Tom

Tom t...@littlemonster.co.uk added the comment:

Thanks!

I'm not surprised that it was something stupidofme like that.

Sorry to have troubled you.

:)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9855
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com