Inquiry regarding the name of subprocess.Popen class

Terry Reedy tjreedy at udel.edu
Tue Sep 2 23:35:20 CEST 2008


Gabriel Genellina wrote:

> Classes represent "things", and class names should be nouns.
> Functions represent "actions", and their names should be verbs. popen
> is a good name for a function; Popen is a bad name for a class.

People who don't like Popen should have made this argument when 
subprocess was being designed (for 2.4) ;-).  Or at least a year ago or 
even 6 month ago when API changes for 3.0 were considered.

Part of the reason for the name is that .Popen completely replaces the 
popen2, popen3, and popen4 functions, and others (yes, functions, not 
classes), now gone (3.0) and either replaces or supplement os.popen 
itself.  I would not have liked subprocess.Subprocess.  Perhaps Proc 
would have been okay.  PipedProcess is too long.  ....




More information about the Python-list mailing list