Re: Are Python's reserved words reserved in places they dont needtobe?

Discussion in 'Python' started by Steve Holden, Sep 13, 2006.

  1. Steve Holden

    Steve Holden Guest

    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
    Steve Holden, Sep 13, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miel Bronneberg

    reserved words

    Miel Bronneberg, Nov 26, 2004, in forum: XML
    Replies:
    1
    Views:
    534
    Martin Honnen
    Nov 26, 2004
  2. metaperl
    Replies:
    32
    Views:
    909
    NickC
    Sep 15, 2006
  3. Delaney, Timothy (Tim)
    Replies:
    10
    Views:
    667
    Jason
    Sep 14, 2006
  4. Tricky

    Newer reserved words

    Tricky, Dec 2, 2008, in forum: VHDL
    Replies:
    2
    Views:
    610
  5. Replies:
    3
    Views:
    164
    osmium
    Nov 6, 2013
Loading...

Share This Page