Python is fun (useless social thread) ;-)
bruno at modulix
onurb at xiludom.gro
Fri Jun 16 10:35:47 EDT 2006
Scott David Daniels wrote:
> BartlebyScrivener wrote:
>
>> .... I am not touching OO, classes, or GUIs until I understand
>> EVERYTHING else. Could take a few years. ;)
>
>
> You know how modules separate globals, right? That is, what you
> write in one module doesn't affect the names in another module.
> What classes (and hence OO) give you is a way of saying, "I'd
> like something a bit like a module, but I'd like to make several
> of them, and not have them interfere with each other." That is
> the big intuition about objects, the rest is just details.
Another way to put it:
You know what are dicts, right ? That is, containers with keyword-access
to values ? Then you probably have dicts with a known, defined
structure, and functions working on it. What classes (and hence 00)
gives you is a way to associate these functions with the dicts
themselves. That is the big intuition about objects, the rest is just
details.
!-)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list