[Python-ideas] English builtins for Python
Mathias Panzenböck
grosser.meister.morti at gmx.net
Wed Jun 20 15:55:42 CEST 2007
Steve Howell schrieb:
> I somewhat tongue-in-cheekly propose to make the first
> seven most common English words all integral part of
> the Python language (three already are):
>
> source: http://www.world-english.org/english500.htm
>
> 1 the:
> Singletons:
>
> the class Logger:
> # ...
>
> 2 of
> inheritance:
>
> class Square of Shape::
> # pass
>
> 3 to
> printing:
>
> print('hello world') to sys.stdout
>
> 4 and
> already a keyword
>
> 5 a
> introspection:
>
> if object is a dict:
> # ...
>
is "a" the keyword or is it "is a"?
> 6 in
> already a keyword
>
> 7 is
> already a keyword
>
> Then it gets tougher:
>
> 8 it
> 9 you
> 10 that
>
> Top 500 words that are already
> keywords/builtins/conventions in Python:
>
> 27 or
> 49 each
each is a keyword? I don't think so. else is a keyword.
> 55 if
> 189 try
> 198 self
self is not a keyword, its a convention.
> 251 open
open is not a keyword, its a other name for the class "file".
> 254 next
>
next is not a keyword. its the name of a method of an iterator.
there are a lot of more methods in python which are single words.
why don't list them, too? ;)
> Top 500 words that are already keywords in some
> languages:
>
> 25 this
> 52 do
> 68 long
>
> Top 500 words that should NEVER be keywords:
>
> 78 could
> 81 did
> 180 men
> 252 seem
> 435 oh
>
> Words that seem like they'd be part of a programming
> language, but maybe a bad idea:
>
> 74 has
> 82 my
> 120 every
> 148 too
>
More information about the Python-ideas
mailing list