Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80729

Re: io.UnsupportedOperation: fileno

From Ben Finney <ben+python@benfinney.id.au>
Subject Re: io.UnsupportedOperation: fileno
Date 2014-11-14 10:52 +1100
References <b501dd95-8ef0-476d-90ff-bf7b44894679@googlegroups.com> <5afd4b4e-e0cd-4436-b15a-936637b4fe2b@googlegroups.com> <b4f3265d-0286-4539-909f-d9e7644277f7@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.15800.1415922741.18130.python-list@python.org> (permalink)

Show all headers | View raw


satishmlmlml@gmail.com writes:

> fileno() in not supported.

It is supported, but it is behaving as the documentation describes
<URL:https://docs.python.org/3/library/io.html#io.IOBase.fileno>.

> Is it only in 3.1? What is the workaround?

Expect an exception when you ask for the file descriptor on a stream
that does not use a file descriptor.

-- 
 \       “Pinky, are you pondering what I'm pondering?” “Well, I think |
  `\       so, Brain, but ‘apply North Pole’ to what?” —_Pinky and The |
_o__)                                                           Brain_ |
Ben Finney

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

io.UnsupportedOperation: fileno satishmlmlml@gmail.com - 2014-11-13 15:23 -0800
  Re: io.UnsupportedOperation: fileno sohcahtoa82@gmail.com - 2014-11-13 15:30 -0800
    Re: io.UnsupportedOperation: fileno satishmlmlml@gmail.com - 2014-11-13 15:34 -0800
      Re: io.UnsupportedOperation: fileno Chris Angelico <rosuav@gmail.com> - 2014-11-14 10:40 +1100
      Re: io.UnsupportedOperation: fileno Ben Finney <ben+python@benfinney.id.au> - 2014-11-14 10:42 +1100
      Re: io.UnsupportedOperation: fileno Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-14 05:10 +0000
    Re: io.UnsupportedOperation: fileno satishmlmlml@gmail.com - 2014-11-13 15:42 -0800
      Re: io.UnsupportedOperation: fileno Ben Finney <ben+python@benfinney.id.au> - 2014-11-14 10:52 +1100
      Re: io.UnsupportedOperation: fileno Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2014-11-14 12:29 +0100

csiph-web