Python is readable

Steve Howell showell30 at yahoo.com
Tue Mar 20 22:44:38 EDT 2012


On Mar 20, 7:28 pm, Ben Finney <ben+pyt... at benfinney.id.au> wrote:
> Steve Howell <showel... at yahoo.com> writes:
> > Also, while the above idiom puts the verbs in the right order, it is
> > still backward to me to say "noun.verb." You don't noun a verb. You
> > verb a noun.
>
> When calling a method, the program object is the grammatical subject.
> You don't verb the noun, and you don't noun a verb. The noun verbs.
>

I think it's a matter of perspective, so there's no right answer, but
I always think of the program object as also being the grammatical
object, with the implied subject/actor being Python itself.  For
example, consider this code:

  stack.push(item)

It's not the stack that's pushing.  It's the stack being pushed on
to.  So "stack" is the direct object, and "item" is the indirect
object.  When you say "stack.push(item)", I think of it as being that
Python pushes an item on to the stack.  I suppose you would argue that
the stack pushes item on to itself?  And even then, isn't it still the
grammatical object in the "itself" case?

Also, don't they call those thingies "object" for a reason? ;)






More information about the Python-list mailing list