En Wed, 03 Sep 2008 21:34:35 -0300, Derek Martin <[EMAIL PROTECTED]>
escribi�:
On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote:
On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
> struct run {
>int speed;
>
On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote:
> On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> >
> > struct run {
> > int speed;
> > direction_type direction;
> > };
> >
> > Not a function. Desc
On Wed, 03 Sep 2008 03:09:18 -0400, Derek Martin wrote:
> On Wed, Sep 03, 2008 at 06:40:10AM +, Marc 'BlackJack' Rintsch
> wrote:
>> 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
En Tue, 02 Sep 2008 19:15:07 -0300, Derek Martin <[EMAIL PROTECTED]>
escribió:
> The Linux man page unfortunately copies (verbatim) the FreeBSD man
> page, which gets it wrong. You can not open a process, but you can
> definitely open a pipe.
(Ok, if it doesn't agree with you, it must be wro
On Wed, Sep 03, 2008 at 06:40:10AM +, Marc 'BlackJack' Rintsch wrote:
> 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
>
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
On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote:
> Derek Martin wrote:
> > On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote:
> >> but the instances of `Popen` are no actions. There's no way to
> >> "execute" a `Popen` instance.
> >
> > Yes there is... you execute it w
On Wed, 03 Sep 2008 01:23:47 -0400, Derek Martin wrote:
> On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote:
>> The subprocess module is also supposed to replace os.system and
>> os.spawn*, neither of which involve opening pipes.
>
> Uh... it's a replacement for os.popen(), which -- guess wha
On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote:
> Derek Martin wrote:
> > On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote:
> >> but the instances of `Popen` are no actions. There's no way to
> >> "execute" a `Popen` instance.
> >
> > Yes there is... you execute it w
Derek Martin wrote:
> On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote:
>> 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. At
> the time of instantiation, yo
Derek Martin wrote:
On Tue, Sep 02, 2008 at 10:55:54PM +, 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 thin
On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote:
> On Tue, 02 Sep 2008 18:15:07 -0400, Derek Martin wrote:
>
> >> Classes represent "things", and class names should be nouns.
> >
> > Is that a law?
>
> It's a common guideline.
Right. It's a guideline.
> > Classes are
On Tue, 02 Sep 2008 18:15:07 -0400, Derek Martin wrote:
>> Classes represent "things", and class names should be nouns.
>
> Is that a law?
It's a common guideline.
> Classes are instantiated by invoking their class names as a function
> call -- the computing equivalent of a verb. Why then, mus
On Tue, Sep 02, 2008 at 05:22:51PM -0300, Gabriel Genellina wrote:
> > The name popen is an abbreviation of "pipe open" -- the function, and
> > the class, open pipes to communicate with another process. What you
> > said is correct; however there are numerous other ways to open
> > subprocesses.
On Tue, Sep 02, 2008 at 06:47:39PM +, Marc 'BlackJack' Rintsch wrote:
> That's why I think the name `Popen` is not so good for it. Because it
> does more than `popen()` and if it is called `Subprocess` or just
> `Process` then it would be merely an implementation detail, that the
> `popen()
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
subproces
En Tue, 02 Sep 2008 12:39:09 -0300, Derek Martin <[EMAIL PROTECTED]> escribió:
> On Tue, Sep 02, 2008 at 01:57:26PM +, Marc 'BlackJack' Rintsch wrote:
>> > I would argue that they don't represent processes at all; the object is
>> > a set of files which connect the standard I/O streams of a su
On Tue, 02 Sep 2008 11:39:09 -0400, Derek Martin wrote:
> On Tue, Sep 02, 2008 at 01:57:26PM +, Marc 'BlackJack' Rintsch
> wrote:
>> > I would argue that they don't represent processes at all; the object
>> > is a set of files which connect the standard I/O streams of a
>> > subprocess to its
On Tue, Sep 02, 2008 at 01:57:26PM +, Marc 'BlackJack' Rintsch wrote:
> > I would argue that they don't represent processes at all; the object is
> > a set of files which connect the standard I/O streams of a subprocess to
> > its parent, and methods to operate on those files.
>
> And the proc
On Tue, 02 Sep 2008 09:28:42 -0400, Derek Martin wrote:
> On Tue, Sep 02, 2008 at 12:27:49PM +, Marc 'BlackJack' Rintsch
> wrote:
>> > The Python class is a generalization of the standard Posix function
>> > of (almost) the same name:
>> > http://opengroup.org/onlinepubs/007908775/xsh/popen.ht
On Tue, Sep 02, 2008 at 12:27:49PM +, Marc 'BlackJack' Rintsch wrote:
> > The Python class is a generalization of the standard Posix function of
> > (almost) the same name:
> > http://opengroup.org/onlinepubs/007908775/xsh/popen.html
>
> So it's a name of a *function* and it's a little bit uns
On Tue, 02 Sep 2008 05:02:07 -0700, Nicola Musatti wrote:
> On Sep 1, 9:23 am, Jeremy Banks <[EMAIL PROTECTED]> wrote:
>> Hi. I wondered if anyone knew the rationale behind the naming of the
>> Popen class in the subprocess module. Popen sounds like the a suitable
>> name for a function that creat
On Sep 1, 9:23 am, Jeremy Banks <[EMAIL PROTECTED]> wrote:
> Hi. I wondered if anyone knew the rationale behind the naming of the
> Popen class in the subprocess module. Popen sounds like the a suitable
> name for a function that created a subprocess, but the object itself is
> a subprocess, not a
En Mon, 01 Sep 2008 04:23:38 -0300, Jeremy Banks <[EMAIL PROTECTED]> escribió:
> Hi. I wondered if anyone knew the rationale behind the naming of the
> Popen class in the subprocess module. Popen sounds like the a suitable
> name for a function that created a subprocess, but the object itself is
>
En Mon, 01 Sep 2008 04:23:38 -0300, Jeremy Banks <[EMAIL PROTECTED]> escribió:
> Hi. I wondered if anyone knew the rationale behind the naming of the
> Popen class in the subprocess module. Popen sounds like the a suitable
> name for a function that created a subprocess, but the object itself is
>
25 matches
Mail list logo