Are Python's reserved words reserved in places they dont need tobe?
Steve Holden
steve at holdenweb.com
Wed Sep 13 04:44:11 EDT 2006
Delaney, Timothy (Tim) wrote:
> 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.
>
>
> Exactly how am I supposed to use my text editor to make words bold? Is
> every text editor supposed to understand a "python format" for code?
>
> Besides, I don't like bold for keywords (or anything in code) - I like
> my keywords blue (RGB 0, 0, 255). Of course, with a "python format", I
> could make *my* keywords blue. But I can pretty much guarantee that my
> preferred editor will not ever understand "python format".
>
This would take us back to the days of Algol 60, where keywords could
either be "stropped" (with single quotes, IIRC) or in some
implementations underlined. I believe that Flexowriters had an underline
key that didn't move the carriage, but it's all a long time ago now.
But I guess we could use the dollar sign to indicate keywords without
requiring too much of people's editors.
$class$ sample1
$def$ __init__(self, a, b):
self.a = a
self.b = b
$def$ __cmp__(self, other):
$return$ self.a.__cmp__(other.a)
Don't see *that* catching on, though ...
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list