[issue1126] file.fileno and file.isatty() should be implementable by any file like object
Fred L. Drake, Jr.
report at bugs.python.org
Mon Sep 17 13:34:24 CEST 2007
Fred L. Drake, Jr. added the comment:
The documentation does not say what's implied by msg55724; they methods
can (and arguably should) be implmented by types for which they apply
(for which there is a corresponding file descriptor, for example).
There is an API issue here as well: what about a wrapper type that is
sometimes associated with a real file, and sometimes not? I suppose in
that case the factory (constructor) needs to detect the situation and
return an instance of an appropriate type.
The documentation is clear, so far as it goes, but is arguably incomplete.
Tracker <report at bugs.python.org>
More information about the Python-bugs-list