title: create fileno on class?
body: <p>I am currently re-writing some code that uses python's <code>select.select()</code> method, but these will only return socket objects in which I have to go and manually match that socket to the socket in a class that was put in there under <code>__init__</code>. the pseudo-code for that would basically be <code>[classobject for classobject in classList if SocketFromSelection == class.socketobject][0]</code> (which I'm pretty much using).</p>
  
  <p>I found in python documentation that in <code>select.select()</code>, "You may also define a wrapper class yourself, as long as it has an appropriate fileno() method (that really returns a file descriptor, not just a random integer)."</p>
  
  <p>My question is, how would I attach a fileno() method in a class so that I can pass a sequence of these classes into <code>select.select()</code> so that it returns the classes and not just the sockets? Also, would this run on windows? If not, is there a better way to match the socket to the socket in a class in a list of classes?</p>