Musings about Python syntax
steve_allison at my-deja.com
steve_allison at my-deja.com
Wed Oct 20 05:28:01 EDT 1999
wtanksle at hawking.armored.net (William Tanksley) wrote:
> Someone else poionted out that member functions versus unqualified
> function calls are not a valid way to distinguish OO from non-OO.
Yes, I appreciate this, it's really the mixture of the two forms of
syntax that I was querying. Guido's point ( len() guarentees return
type, enforces sequence-ness ) seems a stronger reason. Nearly all of
my recent OO coding has been done with Java, a language that came as
such a breath of fresh air after C++ that it has shaped my ideas about
how OO should be done, regardless of it's adherence to the principles
of OO. As a result I tend to expect lists to behave like vectors, and
expect everything to be done with member functions. My bad, really.
> 'del' operates on the variable, not the object contained in
> it. You can del ANY variable, regardless of whether the object it's
> holding implements a __del__ method.
<Penny Drops> Okay, cheers.
> I hope this helps. Good luck.
Yes, thanks everyone!
Happy Pythoning.
Steve
--
Steve Allison
Never reads dejanews mail
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list