[ python-Bugs-998066 ] typo in os.popen4 documentation
SourceForge.net
noreply at sourceforge.net
Sat Aug 7 19:29:18 CEST 2004
Bugs item #998066, was opened at 2004-07-26 10:04
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=998066&group_id=5470
Category: Documentation
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Eric Chen (chen23)
>Assigned to: A.M. Kuchling (akuchling)
Summary: typo in os.popen4 documentation
Initial Comment:
on the page:
http://www.python.org/doc/2.3.4/lib/module-popen2.html
it lists os.popen4 return as:
Returns the file objects (child_stdout_and_stderr, child_stdin)
in practice it would appear to be (Solaris):
Returns the file objects (child_stdin,child_stdout_and_stderr)
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-08-07 13:29
Message:
Logged In: YES
user_id=11375
I've added a note to the popen2 docs about this.
----------------------------------------------------------------------
Comment By: Terry J. Reedy (tjreedy)
Date: 2004-07-29 20:39
Message:
Logged In: YES
user_id=593130
You (understandably) confused two nearly identical but
different functions with two different return conventions
(reversed from each other).
>>> from os import popen4
>>> popen4
<built-in function popen4>
>>> popen2.popen4
<function popen4 at 0x00898768>
Module-popen2.html talks about popen2.popen4 and not
os.popen4.
Module popen2 has 3 functions popen2/3/4 which
consistently return the read and write pipes in that order
(well, popen3 is more complicated, but never mind).
The os module also has functions of the same name but
with reversed return order -- in/out -- as documented:
"This functionality is also available in the popen2 module using
functions of the same names, but the return values of those
functions have a different order."
Why ther reversal? No idea.
The same hint/warning currently does NOT appear in the
popen2 doc nor in its doc string (as accessed via help()) and
I agree it should be.
Suggestion to doc fixer: in Lib Ref 6.8 popen2, end of 4th
paragraph, ending in " or the equivalent functions in the os
module." --
Add "(with reversed return tuples)" before the period.
Without this caveat, they are not really equivalent, as Chen
tripped over.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=998066&group_id=5470
More information about the Python-bugs-list
mailing list