Revision 1 as of 2011-03-26 21:20:06

Clear message

Asking for Help: ...

I'm a beginner with Python and am trying to create a Complex number class. The problem I am having is as follows, if z is a complex number (or other special type) how can I find 1+z? I am able to handle z+1, but it would be much nicer to have the operation be commutative. Whenever I attempt to compute 1+z I receive a TypeError.

When answering questions, add the CategoryAskingForHelpAnswered category when saving the page. This will move the link to this page from the questions section to the answers section on the Asking for Help page.


CategoryAskingForHelp CategoryAskingForHelp

Unable to edit the page? See the FrontPage for instructions.