Underscore data hiding (was python development practices?)
Cliff Wells
logiplexsoftware at earthlink.net
Fri Nov 2 12:34:18 EST 2001
On Friday 02 November 2001 04:19, Steve Holden wrote:
> I don't see why. It's a documented part of the language, so a change would
> create backward incompatibility known to be anathema to the development
> team.
People keep insisting that the Python development team won't introduce
changes that break backward compatability. This may be true for the most
part, but it is definitely not written in stone (or even Python). From the
2.0 docs for socket.bind():
"Bind the socket to address. The socket must not already be bound. (The
format of address depends on the address family -- see above.) Note: This
method has historically accepted a pair of parameters for AF_INET addresses
instead of only a tuple. This was never intentional and is no longer be
available in Python 2.0. "
There are a couple of other places (which I don't recall at the moment) where
things were "fixed" in such a way that you would have to change existing
code. Granted this is a rather trivial example. However, I would definitely
be wary of making my code depend upon something like the name-mangling scheme
which is clearly a hack and actually seems a likely place to see a future
change.
Regards,
--
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308
More information about the Python-list
mailing list