This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients amaury.forgeotdarc, ggenellina, gregory.p.smith, gvanrossum, jhylton, loewis, romkyns, vstinner, zanella
Date 2009-01-05.23:29:46
SpamBayes Score 0.04005468
Marked as misclassified No
Message-id <1231198187.71.0.537669615904.issue3826@psf.upfronthosting.co.za>
In-reply-to
Content
from #python-dev discussion.

agreed, magic attributes are annoying.  also, my gps05 patch continues
to return the old fileno even after the underlying socket has been
closed.  that is a problem.

I like your patch in #4791 but lets keep both sets of our unit tests.

Also, I think the SocketIO.fileno mathod should change to:

  def fileno(self):
    no = self._sock.fileno()
    if no == -1:
      raise IOError("no file descriptor, socket is closed.")

io.IOBase.fileno already raises IOError when no file descriptor is
associated with a file so this behavior seems reasonable and more
pythonic than returning a magic -1.

thoughts?
History
Date User Action Args
2009-01-05 23:29:47gregory.p.smithsetrecipients: + gregory.p.smith, gvanrossum, loewis, jhylton, amaury.forgeotdarc, ggenellina, vstinner, zanella, romkyns
2009-01-05 23:29:47gregory.p.smithsetmessageid: <1231198187.71.0.537669615904.issue3826@psf.upfronthosting.co.za>
2009-01-05 23:29:47gregory.p.smithlinkissue3826 messages
2009-01-05 23:29:46gregory.p.smithcreate