class methods vs. functions

Egbert Bouwman egbert.list at hccnet.nl
Thu Jul 15 16:21:36 EDT 2004


On Thu, Jul 15, 2004 at 02:10:23PM -0400, Christopher T King wrote:
>      but often in 
> the case where an object is mostly used as a container (similar to a C 
> struct), direct access to its attributes is considered the norm:
> 
> 
> Sure, it may not fit with "proper OO methodology", but it's a good way of
> making visible the fact that "this object is a container, I'm retrieving
> one of the variables it contains".  If the interface is well-defined, it
> doesn't matter how you access it, so long as you follow the interface's 
> design.
> 
I am beginning to see the light. Thank you all.
egbert
-- 
Egbert Bouwman - Keizersgracht 197 II - 1016 DS  Amsterdam - 020 6257991
========================================================================



More information about the Python-list mailing list