[Python-checkins] r43126 - in python/trunk: Doc/lib/libsocket.tex Lib/socket.py Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c
"Martin v. Löwis"
martin at v.loewis.de
Tue Mar 21 00:12:25 CET 2006
Guido van Rossum wrote:
> Why are these accessor methods? A more Pythonic API would make them
> read-only attributes, like the various attributes of file objects.
This goes back to a patch comment from me, in python.org/sf/567972:
"""
I also wonder what style of API should be used. All other
state access goes through get-methods(), which all start
with get except for fileno(). Adding properties would
introduce another API style, so -1.
"""
Not sure what I was thinking there - although fileno() *is*
a function. Looking into the library, I see many accessor
functions starting with either get_ or get; however, I don't
recall why that could have been relevant for socket objects.
If you think that should be changed to attributes, we should
do that.
Regards,
Martin
More information about the Python-checkins
mailing list