#NEWLINE# def split_fd( self , fd ) : #NEWLINE# #INDENT# 'Returns an (fd, obj) pair from an ``fd`` parameter.\n\n        We accept both raw file descriptors and file-like objects as\n        input to `add_handler` and related methods.  When a file-like\n        object is passed, we must retain the object itself so we can\n        close it correctly when the `IOLoop` shuts down, but the\n        poller interfaces favor file descriptors (they will accept\n        file-like objects and call ``fileno()`` for you, but they\n        always return the descriptor itself).\n\n        This method is provided for use by `IOLoop` subclasses and should\n        not generally be used by application code.\n\n        .. versionadded:: 4.0\n        ' #NEWLINE# try : #NEWLINE# #INDENT# return ( fd . fileno ( ) , fd ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return ( fd , fd )