On Tue, 02 Sep 2008 19:54:12 -0400, Derek Martin wrote:

>> And if they model an action there must be some way to activate the
>> action
> 
> That's a reasonable assumption, but as I also said, the object might
> just describe the action -- essentially the equivalent of a struct in C.

``struct``\s in C describe *actions*!?  Functions do this.  And a class 
that describes an action that is executed in the `__init__()` method is 
conceptually a function and shouldn't be a class.  There must be a better 
name for the "thing" it returns.  Again guideline, not law, but a very 
strong guideline IMHO.

>> but the instances of `Popen` are no actions.  There's no way to
>> "execute" a `Popen` instance.
> 
> Yes there is... you execute it when you instantiate the object.

But then the instance itself isn't an action but the result of one.

> At the time of instantiation, you "open" the "P" (pipes).  For an
> object which describes an action, I think it's perfectly sensible that
> instantiation is when the action occurs, […]

Here I disagree again.  Because the type/class name of an instance should 
be a name of the "thing"/concept of the instance, not the action used to 
create it.

>> > Yet some of you state your case as if it is incontrovertable fact.
>> > I've given a good case as to why it IS a good name (one which I
>> > genuinely support), and disagree as you may, none of the points any
>> > of you have made invalidate or even weaken my argument.
>> 
>> Maybe from your POV.  Facts:  It doesn't use the `popen()` function
> 
> So?  Neither does the C version of popen(), but that function is still
> called popen()!

Now you lost me.  The C version of `popen()` isn't recursive, why on 
earth should it be, so what's that statement supposed to mean!?

>> to three file objects, more attributes and methods), the function used
>> on Windows under the hood is called `CreateProcess()` not
>> `CreatePipe()`.
> 
> How does Windows implement popen()?  [I think they call it _popen()
> though...]

Doesn't matter because the `Popen()` implementation doesn't use `popen()`.

Ciao,
        Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to