Proposed extension to file constructor

Taral taral at taral.net
Wed Jun 4 10:33:43 EDT 2003


On Wed, Jun 04, 2003 at 08:36:09AM -0400, Oren Tirosh wrote:
> One example of why you might want a file subclass is to extend the
> functionality of the object returned by popen with new methods (e.g.
> retrieving process the exit code). Why should adding a single method
> require the implementation of a complete wrapper object? Another
> functionality that is available only for a true file object and not
> for subclasses is to set the name field to an arbitrary value such as
> '(fdopen)' or a process name.

Another reason is that PyFile_AsFile only works on real file objects.

-- 
Taral <taral at taral.net>
This message is digitally signed. Please PGP encrypt mail to me.
"Most parents have better things to do with their time than take care of
their children." -- Me
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030604/6c94265f/attachment.sig>


More information about the Python-list mailing list