On 2017-01-21, Chris Angelico <ros...@gmail.com> wrote:
> On Sun, Jan 22, 2017 at 9:41 AM, Grant Edwards
><grant.b.edwa...@gmail.com> wrote:
>>  |  __init__(self, family=2, type=1, proto=0, _sock=None)
>>  |
>>
>> Ah! There's a keyword argument that doesn't appear in the docs, so
>> let's try that...
>
> That's marginally better than my monkeypatch-after-creation
> suggestion, but still broadly the same. Your code may well break in
> other Python implementations, but within CPython 2.7, you should be
> pretty safe.

For those of you still paying attention...

It looks like CPython 3.4 socket.fromfd() does return the same type
object as socket.socket().  And, using the fileno= argument to
socket.socket() avoids duplicating the descriptor.

Looks like somebody with a time machine read my original post...

-- 
Grant


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to