> For example, let's say we have a program that deals with drawing shapes 
> like circles.  One way we could imagine doing this is to represent a 
> circle as an x/y coordinate, a radius, and a color.  In this situation, 
> things that work on circles will take in at least those three arguments:
                                                           ^^^^^

Ok, so I have some trouble counting.  *grin* Substitute "three arguments" 
with "four arguments".  My draft message message originally used only x, 
radius and color.  When I added in the y coordinate, I forgot to 
compensate.  My apologies!


One other thing to note: this structuring really doesn't have much to do 
with OOP.  It's more fundamental than that!  Many languages have some 
mechanism for defining a way to build compound data.  C has structs and 
Pascal has records.  It just turns out that most OOP-ish languages provide 
one main construct for bundling data in classes.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to