A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-April/034492.html below:

[Python-Dev] Placement of os.fdopen functionality

[Python-Dev] Placement of os.fdopen functionalityGreg Ewing greg@cosc.canterbury.ac.nz
Fri, 11 Apr 2003 12:39:53 +1200 (NZST)
> If I had to do it over again, your suggestion would make sense;
> 
> But having this in the os module, which deals with such low-level file
> descriptors, still strikes me as a pretty decent place to put it as
> well, and I don't think it's worth the bother of updating
> documentation and so on.

I can think of another reason for making it a class
method: so that custom subclasses of file, or other
file-like objects, can override it to create objects 
of the appropriate type.

But since it is an os-dependent feature, the implementation
of it probably does belong in the os module.

So how about providing a file.fromfd() which calls
os.fdopen()?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4