[issue13564] ftplib and sendfile()

Éric Araujo report at bugs.python.org
Sat Dec 10 17:40:37 CET 2011


Éric Araujo <merwok at netwok.org> added the comment:

> deciding whether using sendfile() should probably be done silently (no explicit argument)
As an optimization taking advantage from OS support, I think this should be automatic too.  But if there are too many issues, then explicit argument sounds better.

> the input fd should be a regular file and it's not clear how to determine this beforehand
Calling some function like os.stat that only works with real files?  (not sure os.stat is the right function, just giving an idea)

> in case of disconnection OSError is raised instead of socket.error
PEP 3151!
>>> socket.error, OSError, IOError
(<class 'OSError'>, <class 'OSError'>, <class 'OSError'>)

:)

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13564>
_______________________________________


More information about the Python-bugs-list mailing list