Python 1.6 alpha 1 released

Robert Roy rjroy at takingcontrol.com
Tue Apr 4 16:02:02 EDT 2000


On 04 Apr 2000 09:49:48 -0400, Guido van Rossum
<guido at cnri.reston.va.us> wrote:

>Before more people mail this to me, let me apologize.  I didn't
>realize that there were so many examples of the 2-argument form.  I
>don't want to break that much code, so I'll revert the decision in the
>next alpha release.
>
>However, I'll do so for purely backwards compatible reasons, and I
>will continue to press for the tuple address as the correct form.
>This has nothing to do with academic purity.  It is because sockets
>are, by their very nature, address family neutral, and not all address
>families use a host and a port to identify a socket.  For example,
>Unix sockets use just a filename.
>
>The argument that gopherlib c.s. define a 2-arg connect() doesn't mean
>that socket should, to: those are all Internet specific protocols,
>where host+port is the norm; the lower-level socket API must support
>other address families.
>
>The argument that the address object is spurious doesn't hold water.
>There are many places where it is convenient to hold an address in a
>single variable, and a tuple is the obvious way to represent this.
>(The alternative, a "host:port" string, seems too Perlish to me.)
>Note also that recvfrom() returns the address as a tuple (if it is an
>IP address) and sendto() requires the address to be passed as a tuple
>-- the canonical form of an address is clearly a tuple.
>
>Repeat after me: SOCKETS ARE NOT JUST FOR IP CONNECTIONS.
>
>But I will fix the code -- it's the only practical thing to do.
>
>--Guido van Rossum (home page: http://www.python.org/~guido/)

Does this mean that the two argument connect will be officially
deprecated in 1.6,  (and be documented as such) and removed in a
future release say 1.7?

This would serve as fair warning to and give people a release cycle to
clean up their code.

Bob





More information about the Python-list mailing list