newbie lists and code examples for OOP.

Peter Hansen peter at engcorp.com
Fri Mar 1 07:07:39 EST 2002


skoria wrote:
> 
> Firstly: is there a better forum for newbie questions like this one?
> It's hard for me to post to a high traffic list, and maybe there's a
> local uk based one or one specifically aimed at newbies.
> 
> I'm trying to write a class where one function calls a method in the
> same class. Right now I'm doing this with trial and error, and I don't
> really understand where I need to put parentheses, use (self), etc. I
> can't find any "functional" examples of object oriented programming on
> any online tutorials, or any simple programs already written that can
> be used as a good tool to figure out how to call functions within
> classes in python, when to use self.* what internal functions (like
> __init__) can be used for. Lots of theory on this, but no functional
> examples.

I'm not sure if by "functional" you mean "working examples" rather
than "functional programming" in the computer science sense...

If the former, have you looked in the python\lib folder to examine
the source code for all the standard modules.  At least some of them
are object-oriented with samples of what you are looking for, and more.

-Peter



More information about the Python-list mailing list