[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-164]

fix some docs
remove some epydoc comments about fileno() being non-portable.
This commit is contained in:
Robey Pointer 2005-04-18 00:53:57 +00:00
parent 89ccac6bfa
commit bd7911895b
1 changed files with 13 additions and 17 deletions

View File

@ -470,8 +470,6 @@ class Channel (object):
@return: C{True} if a L{recv} call on this channel would immediately @return: C{True} if a L{recv} call on this channel would immediately
return at least one byte; C{False} otherwise. return at least one byte; C{False} otherwise.
@rtype: boolean @rtype: boolean
@note: This method doesn't work if you've called L{fileno}.
""" """
self.lock.acquire() self.lock.acquire()
try: try:
@ -719,10 +717,9 @@ class Channel (object):
def makefile(self, *params): def makefile(self, *params):
""" """
Return a file-like object associated with this channel, without the Return a file-like object associated with this channel. The optional
non-portable side effects of L{fileno}. The optional C{mode} and C{mode} and C{bufsize} arguments are interpreted the same way as by
C{bufsize} arguments are interpreted the same way as by the built-in the built-in C{file()} function in python.
C{file()} function in python.
@return: object which can be used for python file I/O. @return: object which can be used for python file I/O.
@rtype: L{ChannelFile} @rtype: L{ChannelFile}
@ -1095,13 +1092,12 @@ class Channel (object):
class ChannelFile (BufferedFile): class ChannelFile (BufferedFile):
""" """
A file-like wrapper around L{Channel}. A ChannelFile is created by calling A file-like wrapper around L{Channel}. A ChannelFile is created by calling
L{Channel.makefile} and doesn't have the non-portable side effect of L{Channel.makefile}.
L{Channel.fileno}.
@bug: To correctly emulate the file object created from a socket's @bug: To correctly emulate the file object created from a socket's
C{makefile} method, a L{Channel} and its C{ChannelFile} should be able to C{makefile} method, a L{Channel} and its C{ChannelFile} should be able
be closed or garbage-collected independently. Currently, closing the to be closed or garbage-collected independently. Currently, closing
C{ChannelFile} does nothing but flush the buffer. the C{ChannelFile} does nothing but flush the buffer.
""" """
def __init__(self, channel, mode = 'r', bufsize = -1): def __init__(self, channel, mode = 'r', bufsize = -1):