Inquiry regarding the name of subprocess.Popen class
Terry Reedy
tjreedy at udel.edu
Tue Sep 2 22:37:25 EDT 2008
Derek Martin wrote:
> On Tue, Sep 02, 2008 at 10:55:54PM +0000, Marc 'BlackJack' Rintsch wrote:
>
>> It's a way more self explaining name, even for people who know the
>> `popen()` function
>
> I, and apparently the maintainers (at least at the time they added
> this thing) don't agree. In fact I think it's quite the opposite. If
> I came across such a "process" object without knowing what it was, I
> would expect that a process object described a running process, i.e.
> gave information about things like executable path name, cpu and
> memory utilization, perhaps a list of all open file descriptors (but
> not just three specific ones), etc; or something similar. This object
> provides none of that. It does not, in fact, describe a process at
> all. It is quite distinct and different from the concept of a
> process, indeed.
>
>> because there's a concept called "process" but none called "popen".
>
> Anything that exists can be conceptualized and therefore is a concept.
> The popen concept exists, and is more than just a concept; it has a
> concrete implementation in C AND Python and numerous other languages.
> Verbs can be concepts too.
In this case, at least, I think of the module name as part of the total
class name. subprocess.Popen == open pipes to a subprocess -- and
return a structure that lets me use the pipes and monitor the process.
So as a practical matter, I am okay with the name even if I
theoretically agree with the guideline as a guideline.
tjr
More information about the Python-list
mailing list