diff options
author | Guido van Rossum <guido@python.org> | 2001-10-27 22:20:47 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-27 22:20:47 (GMT) |
commit | 384ca9c6dd4906c825e126218895f20b8f686372 (patch) | |
tree | aa457bd5389815ff292975438c751aa51a510fa8 /Misc | |
parent | bd67d6f32c813eb3c17a07d305db7004c2dcee0a (diff) | |
download | cpython-384ca9c6dd4906c825e126218895f20b8f686372.zip cpython-384ca9c6dd4906c825e126218895f20b8f686372.tar.gz cpython-384ca9c6dd4906c825e126218895f20b8f686372.tar.bz2 |
Made SocketType and socket the same thing: a subclassable type whose
constructor acts just like socket() before. All three arguments have
a sensible default now; socket() is equivalent to
socket(AF_INET, SOCK_STREAM).
One minor issue: the socket() function and the SocketType had
different doc strings; socket.__doc__ gave the signature,
SocketType.__doc__ gave the methods. I've merged these for now, but
maybe the list of methods is no longer necessary since it can easily
be recovered through socket.__dict__.keys(). The problem with keeping
it is that the total doc string is a bit long (34 lines -- it scrolls
of a standard tty screen).
Another general issue with the socket module is that it's a big mess.
There's pages and pages of random platform #ifdefs, and the naming
conventions are totally wrong: it uses Py prefixes and CapWords for
static functions. That's a cleanup for another day... (Also I think
the big starting comment that summarizes the API can go -- it's a
repeat of the docstring.)
Diffstat (limited to 'Misc')
0 files changed, 0 insertions, 0 deletions