"as" keyword woes

Paul Boddie paul at boddie.org.uk
Mon Dec 8 14:21:55 EST 2008


On Dec 4, 5:39 pm, "Chris Mellon" <arka... at gmail.com> wrote:
>
> Honestly, based on the content and tenor of this post I think this is
> Yet Another Python Troll

So original: disagreeable criticism is "trolling". A few points...

Short keywords are more likely to collide with short variable and
attribute names, and while we should all use descriptive names for
things, the complainant does seem to have found a reasonable
application of a short name; when new short keywords are introduced,
conflicts with such applications are inevitable, and that's exactly
what has happened here.

Anyone who has used any library or framework which combines another
domain or technology with Python has probably seen names with trailing
underscores; I believe PyQt employs exec_ instead of exec in various
places, for example. Choosing some other name which needs no
underscore can work against the beginner if they are referring to
generic documentation.

My message on python-dev about parsers and keywords noted that some
languages manage to achieve what the complainant wants, more or less.
SQL implementations, for example, can often deal with keywords if they
are qualified, and it is even possible to double-quote keywords and
use them as identifiers:

create table "create" (
  "select" varchar
);

select "select" from "create";
select "create".select from "create";

(This from a PostgreSQL 8.2 session.)

[...]

> If you suppressed or ignored the deprecation warning that
> all your code has been generating for at least 2 years it's pretty
> damn ballsy to come here and tell everyone how *Python* is doing
> something wrong.

Maybe the complainant realises that he has no say in this matter and
that he has to raise it in this fashion as a last resort. I've only
skimmed this thread, but if the complainant is still using 2.4 (like a
number of people) he won't have seen such a warning (although maybe he
admits seeing it somewhere amongst the pile of "how dare you
criticise?!" messages), and now he sees that he's running out of road.

What I can say is that it certainly does take balls to see matters
from the other guy's perspective instead of calling someone names for
pointing something out.

Paul



More information about the Python-list mailing list