[Tutor] methods and functions

Gerardo Arnaez garnaez@yahoo.com
Fri Jun 13 13:56:01 2003


Thank you for the explication.

--- Neil Schemenauer <nas-pytut@python.ca> wrote:
>When looking up draw, if the c instance has a
> draw attribute it
> will be returned directly.  If the c instance does
> not have a
> draw attribute, as in this case, Python does not
> give up but instead
> follows the __class__ attribute of the c instance
> and looks in that
> object for a draw attribute.

How can an instance of a class NOT have an attribute
that has been defined for that class.

ie you said, if the c instance does not have a draw
attribute,  but you have already defined the draw
method in the class(ie

class Circle:
   def draw(self):
      pass


... yes?

Thanks again, I printed it out and read it a few times

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com