| |
comp.lang.python |
--- Steven D'Aprano > > It also has a ComplexNumber class, but I don't > Is it as short as this one-liner? > ComplexNumber = complex Obviously, it's not surprising that a useful class in ComplexNumber = complex ___________________________________________________________________________ _________
> On Sat, 26 May 2007 18:48:45 -0700, Steve Howell
> wrote:
> want to
> > scare away mathphobes.
written by Guido van Rossum. Here is an excerpt:
... self.r = realpart
... self.i = imagpart
...
>>> x.r, x.i
a tutorial would have a corresponding implementation
in the standard library, but I'm not sure newbies
would learn much about classes from this statement:
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091