Are Python's reserved words reserved in places they dont need tobe?

Antoon Pardon apardon at forel.vub.ac.be
Thu Sep 14 10:24:25 EDT 2006


On 2006-09-14, Steven D'Aprano <steve at REMOVEME.cybersource.com.au> wrote:
> On Wed, 13 Sep 2006 07:45:02 +0000, Antoon Pardon wrote:
>
>>>> This is just an idea of mine, nothing I expect python to adapt.
>>>> But just suppose the language allowed for words in bold. A word
>>>> in bold would be considered a reserved word, a word in non bold
>>>> would be an identifier.
>
> [snip]
>
>> <Shrug>, Different options are possible, in a file the keywords
>> could just be prefixed with a Ctrl-K, and depending on the editor or its
>> setting, this could be shown bold or blue or whatever. I don't care
>> about the specifics at this point. I just wanted to make clear there
>> is the option to make/show the distiction between identifiers and keywords
>> more explicitly.
>
> But surely all you are doing is changing the reserved word from (say)
> "return" to "\x0breturn". Once you do that, you can bet that people will
> complain that they want to have identifiers in bold too, why can't they
> create a name "\x0breturn", and somebody will come up with an even more
> complicated scheme for accommodating them... wash, rinse, repeat.

Do you really think this is a serious possibility? As far as I can see,
that \x0b that will be prepended to differentiate keywords from
identifiers is a technique called stropping, that has been used with
some algol languages. Have you any knowledge of people programming algol
who asked for the use of stropped identifiers?

I think I really would be amazed to find out there were such people,
but then I have been amazed before. So I really would like to know.

-- 
Antoon Pardon



More information about the Python-list mailing list