PEP 312 - Making lambdas implicit worries me, surely it's just the name 'lambda' that is bad...

Alex Martelli aleax at
Sat Mar 15 12:50:01 CET 2003

Stephen Horne wrote:
> I have Aspergers disorder, and as a result I have a strong tendency to
> overpedantic use and interpretation of language. Back at school in

While I've never been diagnosed with any such disorder, I can certainly
identify with many (not all) of the symptoms you mention.

> assumed it was actually wrong - that the 'such as' need not imply
> 'all' even though it frequently does.

In a huge majority of use cases, "such as" is followed by SPECIFIC,
not GENERIC, examples of what precedes it -- so, the question does
not even arise; when you say, e.g., "engineers such as John" you
are definitely stating that John is an engineer.

A second category of use cases does include implicit qualification.
E.g., "Explore EU funding opportunities such as subsidies, grants,
loans" -- I would agree there is no implication whatsoever that
ALL subsidies, grants and loans are given out by the EU... however,
there IS an implication that they're all examples of opportunities,
and even, more specifically, of "funding opportunities".  So, here,
the phrase "EU funding opportunities" needs to be split based on
semantics grounds in order to make sense of the sentence.  I think
that, with some ingenuity, one might construct along these lines
an understandable sentence where "such as" leads to some implied
qualification.  Offhand I can't make an example that rings quite
true, but consider for example "the best-trained policemen (such
as German policemen)" shortened to "(such as German ones)" then
further shortened to "(such as Germans)" -- it doesn't sound quite
natural English, but it's a sentence that a non-native speaker
might easily utter without any intention of implying that all
Germans are policemen, just because of some slight confusion on
nuances of English grammar (quite understandable, e.g., from an
Italian, used to a language where "i tedeschi" might equally well
stand for "the Germans" or "the German ones").  I encourage you
to proceed along the lines of these exploration and I'm confident
that you'll be able to construct some example of this use.

_However_ -- I don't think this is yet analogous to your use of
"such as built-in function names" to mean "such as some, but not
all, built-in function names".  In the hypothetical "such as
Germans" standing for "such as German ones", we have a slight and
perhaps-understandable confusion between adjective and pronoun.
I can see no such explanation for simply dropping "some, but not
all" in your case.

> I've heard enough people use the structure this way (and used it
> myself that way) without confusion that I've never questioned that.

So maybe you can offer me many examples that do sound perfectly
natural to a native speaker -- I do suffer under the disadvantage
that English is not my mother tongue, after all.  A lot of
Googling has failed to show me *any* such example -- by far most
hits are of the form "such as <specific>", and those where
something more generic follows the "such as" don't appear to
match the pattern you were using.

> In normal use, most language forms *are* regularly used in ways that,
> according to the textbooks, are inaccurate. Not all possible meanings

Sure!  I just don't see this as applying to "such as", but, since
that's what we're talking about, you can no doubt enhance my
understanding of English by providing abundant examples of such
"normal use" (examples in the context of accurate technical
discourse would be even more welcome, but I'll accept others almost
as gladly).

> of a given syntactic structure, any more than a possible choice of
> words, should be taken seriously. Expecting people to obsessively
> remove every possible misinterpretation and every possible
> justification for a misinterpretation would make language completely
> impractical. That is presumably why I've seen so much evidence for my
> interpretation of the '(such as ...)' form.

I really look forwards to being presented with that huge amount
of evidence, and will gladly apologize, when you do so, for letting
my inadequate knowledge of English lead me astray.  Of course, the
"so much" qualification is important; if in 999 cases out of 1000
the use of "X (such as Y)" does imply Y's are X's, then I think it
was not reasonable of you to expect us poor non-English-mothertongue
readers "catch" the subtle nuance that you were using it in the
"exceptional one case out of one thousand" way, when it would have
cost you so little to help us out by adding a "some" or "most".

Just as you say, expecting people to obsessively ask for clarification
of every expression that's 99.9% unambiguous, just in case the
exceptional "one in a thousand" nuance was being employed, would
make language completely impractical -- most particularly when the
removal of the ambiguity would cost as little as adding one little

> The English language is an entity defined by the collective
> understanding of its speakers - the grammar references were written by
> people (experts, true, but certainly not omniscient ones) who were

I fully agree with this.  When I worked in computational linguistics,
that was one crucial result of our research -- by using statistics to
model the way people actually DO use the language, rather than "rules"
to try and model the way people "should" use it according to some
authority, we obtained much better rates of dictation-recognition, &c.

I also had the good luck to work with Professor Tullio de Mauro, a
major Italian linguist, on exploring these issues, and found that this
stance is essentially universal in contemporary linguistics -- that
linguistics is descriptive, not usefully prescriptive.

Which is why I look forwards to the mass of evidence for your usage
of "such as", not to a pointer to some old and dusty grammar tome.

> So at this point, I believe I can get away with a small piece of
> weaseling by saying that - if that 'such as' structure is so often
> used in the 'not necessarily all' sense (whether by accident or
> design), without confusion - maybe in everyday English language it
> isn't as wrong as the textbooks might say.

Absolutely!  Our disagreement, or misunderstanding, at this point,
is on whether the antecedent of this "if" holds.  I do not believe
it does, but it's very easy for you to show me I'm mistaken (or, in
the unlikely case you can't find overwhelming masses of evidence
for your usage, then perhaps you _might_ consider apologizing, as,
in that case, it would appear to me that you have [a] attacked me
and [b] induced me to go on a wild-goose chase for usage evidence
that does not, at this time, appear to me to exist, all, apparently,
in a bid to feistily and tenaciously keep defending what would in
this hypothetical case have to be called your original mistake).

>>> Now I think about it, most built-in functions probably return a value
>>They all do, but that value can of course be None.
> Was that a deliberate attempt to annoy me!!! ;-)

Just a (deliberate) refuse to stop being pedantic in a thread that
seems to be about nothing but pedantry.

> IMO, the missing word 'useful' was redundant - unnecessary because the
> intention was clear in context and the distinction irrelevant to the
> issue being discussed.

I can see why you'd like to use the "intention clear in context"
defense, and it's surely quite sensible here, but I just cannot see
how you can make the preposterous claim that "the distinction [is]
irrelevant".  Whether the value returned by a built-in function is
NECESSARILY useful or not, i.e., "the distinction", is ALL that is
being discussed in this sub-sub-sub-thread, so how can it possibly
be "irrelevant" to it?!

E.g., reload(x) does "return a value" -- the value x, specifically --
but that is hardly ever "useful", since object x has been updated
in-place.  This is of course _quite_ relevant to the typical usage
patterns for reload!

>>Once again, the _relevance_ of this to anything whatsoever appears to
>>be totally mysterious to me.  If MOST built-in functions very rarely
>>make sense at the start of a logical line, then the "context" you were
>>earlier claiming as the justification for (what I do still consider)
>>your mis-statement is very weak indeed -- and so much more important
>>was it then for me to correct that mis-statement, according to your
>>own interpretations as previously presented.
> Your original statement implied that I wasn't aware of that built-in
> function names can start a line. To me, that fact is common sense

I dispute that it implied anything of the kind, as I have already
stated on this thread.  If you say "the sky is green" and I correct
this statement by counter-stating "no, the sky is blue", any of
several situations may apply:

a. you might indeed be unaware of the sky's color,
b. you might have mis-expressed your meaning,
c. you might be deliberately asserting a falsehood (commonly known
   as "lying"), perhaps e.g. in an attempt to be funny

It's generally not up to me to distinguish which of these cases
may apply -- I care about the sky's color, and it being clearly and
correctly communicated to other readers of this thread, not about
your knowledge, intentions, and expressive abilities.

> therefore I felt insulted - if it is common sense, then your telling
> me implies that I don't even know common sense things.

Ah, but I'm not telling *YOU* -- I'm correcting your mis-statement,
made in a public forum, by an equally public counter-statement; I
am "telling" _everybody_ who chooses to listen, including, quite
possibly, readers whose current grasp of Python may not suffice to
distinguish the truth or falsehood of your original statement.

> On realising that no insult was intended, I wanted to do more than
> just say 'sorry' and go away - a simple retraction leaves open the
> possibility that I might want the issue to go away, but still believe
> in myself that you wanted to insult me. I don't believe that you
> intended an insult, so I wanted to make sure that was understood.
> In an (obviously misguided) attempt to show that I can see different
> sides to the issue, I explained why I think it's common sense and gave
> one reason why others might have a different view of what's common
> sense would do that. If your view of whether the issue is common sense
> is different, you weren't necessarily calling me stupid.
> In short, I was trying to express that maybe, in another persons
> mindset...
>>the "context" you were
>>earlier claiming as the justification for (what I do still consider)
>>your mis-statement is very weak indeed
> And now I feel a little upset that you picked up on that thought, yet
> you completely missed the intention behind it and used it to attack me
> rather than in the spirit of reconciliation in which it was offered.
> Of course I have no right to complain about that, but I hope you can
> understand what I'm saying now - before long, the clarifications are
> already reaching an epic scale ;-)

I am not sure I entirely understand what you're saying, but it seems
to me that most of it comes from taking technical discourse as personal
attacks.  When I discuss what built-in functions could reasonably be
used in one way or another way, I am discussing Python (what this
newsgroup is _alleged_ to be about).  If you choose to take this as
discussing Stephen Horne instead, then it's not surprising that things
may end up being very tangled.


More information about the Python-list mailing list