TypeError: no arguments expected

shawn a boris317 at gmail.com
Mon Dec 12 15:22:54 EST 2005


thanks for all your input. Ive gotten it to work thanks!

--shawn

On 12/12/05, Steve Holden <steve at holdenweb.com> wrote:
> Dennis Lee Bieber wrote:
> > On Sun, 11 Dec 2005 22:00:55 -0500, shawn a <boris317 at gmail.com>
> > declaimed the following in comp.lang.python:
> >
> >
> >>I havet these 2 files in the same dir. This is code im writing to learn pythong
> >>mkoneurl.py:
> >>#! /usr/bin/env python
> >>
> >>import make_ou_class
> >>
> >>run = make_ou_class.makeoneurl()
> >
> >
> >       Okay, you've just defined a "run" object that contains an instance
> > of "makeoneurl"... What do you expect it to do?
> >
> Let's get the terminology right: sloppy terminology leads to sloppy
> thinking. The statement binds the name "run" to a newly-created
> "make_one_url" instance. Remember, "run" isn't an object, it's a
> reference to an object like all Python names.
> >
> >>====================================
> >>make_ou_class.py:
> >>
> >
> >       Well, first off... You need to /supply/ a placeholder for "self".
> > ALL methods of a class receive the instance as the first argument. So...
> >
> Again you need to be a little careful here, since we now have class
> methods and static methods to cloud the picture. So it would be more
> accurate to say that "instance methods are all automatically called with
> a reference to the instance as the first argument; it is conventional to
> use the name 'self' to refer to the instance".
> >
> [...]
>
> regards
>   Steve
> --
> Steve Holden       +44 150 684 7255  +1 800 494 3119
> Holden Web LLC                     www.holdenweb.com
> PyCon TX 2006                  www.python.org/pycon/
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list