classes (was Re: Same again please for OOP)
aleaxit at yahoo.com
Mon Dec 25 18:39:15 EST 2000
"Moshe Zadka" <moshez at zadka.site.co.il> wrote in message
news:mailman.977785029.26926.python-list at python.org...
> To clarify my position: I don't think the __getattr__/__setattr__
> functionality is not needed, and indeed, in several cases, this is
> a very powerful feature. My only gripe is that this power is given
> in a very non-Pythonic way: it's way too easy to shoot one's self
> in the foot with it.
OK. As it happens, I didn't get too many toes so far, but I
do see it could happen in the future.
> What if, instead, you'd have a way to mark methods as as "auto-called"
> methods: IOW, a method which is automatically called as soon as an
> attribute is get/set/deleted. This would solve 80% of the problem,
> living raw __getattr__ usage to arcane problems.
That would be handy, and I like 'Boost Python' approach to that --
naming conventions rather than complex correspondences (see
www.boost.org, but i guess C++-loathers would rather ignore it:-).
More information about the Python-list