Hi everyone!

This is regarding the inbuilt 'complex' function. The python docs say:
"Note: When converting from a string, the string must not contain whitespace 
around the central + or - operator. For example, complex('1+2j') is fine, but 
complex('1 + 2j') raises ValueError."

Why is this so? Why can't spaces be allowed everywhere and simply ignored? I 
went through the source and it did not seem like this was an internal 
requirement, so it seems like a design choice. Is there any reason why spaces 
in the middle would be a problem?

Jayanth Koushik
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to