Definite or indefinite article for non-singletons?

Richard Damon Richard at Damon-Family.org
Sun Jul 28 20:04:36 EDT 2019


On 7/28/19 7:04 PM, Chris Angelico wrote:
> On Sun, Jul 28, 2019 at 5:36 PM Marko Rauhamaa <marko at pacujo.net> wrote:
>> So it depends on the context if the relevant equivalence is "is" or
>> "==". Maybe the rule of thumb is that if we are talking about strings,
>> integers and similar things, we should think about it from the point of
>> view of Python's data model (objects; "is"). But when we talk about
>> things like "length", "square root", "sum" or "name", the point of view
>> is the abstractions the objects are standing for ("==").
> Interesting. So in your view, a string object representing zero
> characters is "an", but its length is "the"? I'd have thought that
> both are considered value types, where identity is immaterial.
>
> Thanks for all the insights, all. This is a curious point of English
> and one that I've definitely seen people on both sides of.
>
> My apologies for not responding earlier or to individual posts. For a
> while (and I'm actually not certain that this post will make it), all
> Gmail addresses have been unable to post to python-list, and even
> contacting the list-owner wasn't possible.
>
> ChrisA

It is the length of a string, as a given string only has a single
length, so grammatically, it wants the definite article always.

When talking of empty strings, we need to look a bit at context.  "The
empty string" implies that there is only one of them, and if we are
talking about values, then there is only one empty string values, so
"The empty string value" would be correct (and the term value might be
implied by context). If we are talking about object, like with the
python word "is", then the empty string is not promised to be a
singleton, so grammatically, it should be "A empty string object", and
again the term object might be implied by the context.

English, being a natural language (and one with a complicated history),
can be filled with all sorts of strangeness, and this can get compounded
when it wants to be harmonized with a technical subject which can't deal
with some of the naturalness of language, thus we can't try to use some
sort of rule matching the type of article to the appropriateness of the
python word "is".

-- 
Richard Damon




More information about the Python-list mailing list