What is not objects in Python?

Tim Rowe digitig at gmail.com
Fri Oct 3 12:10:24 CEST 2008


2008/9/30 Lie Ryan <lie.1296 at gmail.com>:

> Actually str.len and len(str) is just like saying "the string's length"
> and "the length of the string". There is no difference between the two
> except for personal preference. (I am no linguist-- not even a native
> speaker of English --but I think there is a subtle difference on
> emphasis, "the string's length" emphasizes on the length being string's
> property, while "the length of the string" emphasizes on the length
> itself, am I correct?)

Well, I'm doing a linguistics degree, so I'm not a linguist /yet/, but
I think I know this one. There is the difference in emphasis that you
mention, but there may be something more significant. In both forms,
"length" is what linguists call the "head" of the noun phrase: it's
the actual thing being talked about.  In "The string's length" the
head is only pre-modified ("the string's" comes before the head and
there's nothing after the head). "The length of the string" has both
pre- and post- modification ("The" before, "of the string" after).
Post modification in noun phrases has been measured to be much less
frequent in spoken English than in written English, and it gets
progressively more common as the writing style gets more formal.  That
suggests that "the string's length" is an easier phrase to produce and
understand, but "the length of the string" sounds more official.

-- 
Tim Rowe



More information about the Python-list mailing list