[Numpy-discussion] question about standalone small software and teaching

Bill Baxter wbaxter@gmail....
Wed Apr 4 21:12:52 CDT 2007


Ok, I got another hopefully easy question:

Why this:
    class Point(object):
          ...

Instead of the style that's used in the Python tutorial in the
'classes' chapter:
    class Point:
        ...

--bb


On 4/5/07, Robert Kern <robert.kern@gmail.com> wrote:
> Sebastian Haase wrote:
>
> > OK, but what is "wrong" with the first way !?  I mean,  it somehow
> > seems not like "it's usually done" in Python ?  Normally there is
> > always a __init__(self) that sets up everything referring to self --
> > why is this tutorial doing it differently ?
>
> Because it makes the code more readable for the point it's trying to get across.
> The __init__ style code would be irrelevant detail detracting from the main point.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>  that is made terrible by our own mad attempt to interpret it as though it had
>  an underlying truth."
>   -- Umberto Eco
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>


More information about the Numpy-discussion mailing list