OT: The Straight Dope

Discussion in 'Python' started by Jeff Bauer, Oct 7, 2003.

  1. Jeff Bauer

    Jeff Bauer Guest

    As a longtime reader (20+ years) of Cecil Adams'
    "Straight Dope" columns, I was amused to find a
    brief mention of Python programming in today's
    response to the following question.

    "What's the 'Scroll Lock' key on my computer for?"

    http://www.straightdope.com/mailbag/mscrolllock.html

    "However, programmers, being loath to let extraneous
    keys sit unused on a keyboard, have found use for
    [backquote] as an operator in the LISP and Python
    programming languages."

    if-tim-is-sherlock-then-cecil-must-be-mycroft-ly y'rs,

    Jeff Bauer
    Rubicon Research
    Jeff Bauer, Oct 7, 2003
    #1
    1. Advertising

  2. Jeff Bauer wrote:
    > As a longtime reader (20+ years) of Cecil Adams'
    > "Straight Dope" columns, I was amused to find a
    > brief mention of Python programming in today's
    > response to the following question.
    >
    > "What's the 'Scroll Lock' key on my computer for?"
    >
    > http://www.straightdope.com/mailbag/mscrolllock.html
    >
    > "However, programmers, being loath to let extraneous
    > keys sit unused on a keyboard, have found use for
    > [backquote] as an operator in the LISP and Python
    > programming languages."
    >
    > if-tim-is-sherlock-then-cecil-must-be-mycroft-ly y'rs,


    It might have something to do with the CMU Common Lisp compiler, also
    named Python ?

    Just my 2 cents...
    Bruno
    Bruno Desthuilliers, Oct 7, 2003
    #2
    1. Advertising

  3. Jeff Bauer

    Andrew Dalke Guest

    Bruno Desthuilliers:
    > It might have something to do with the CMU Common Lisp compiler, also
    > named Python ?


    No. Backticks are another way of doing repr. Few use it.

    >>> print "Hello"

    Hello
    >>> print `"Hello"`

    'Hello'
    >>>


    Andrew
    Andrew Dalke, Oct 7, 2003
    #3
  4. Andrew Dalke wrote:
    > Bruno Desthuilliers:
    >
    >>It might have something to do with the CMU Common Lisp compiler, also
    >>named Python ?

    >
    >
    > No. Backticks are another way of doing repr. Few use it.
    >
    >
    >>>>print "Hello"

    >
    > Hello
    >
    >>>>print `"Hello"`

    >
    > 'Hello'
    >


    Woops. I forgot this...
    as you say : '"Few use it." !-)

    Bruno
    Bruno Desthuilliers, Oct 8, 2003
    #4
  5. Jeff Bauer

    Nick Vargish Guest

    Jeff Bauer <> writes:

    > if-tim-is-sherlock-then-cecil-must-be-mycroft-ly y'rs,


    Just a correction; the SD article quoted in the previous post was
    written by a Staff Reporter ("Una Persson"), not the exalted
    Cecil Adams himself.

    I did think it was funny that Python was mentioned, but Perl was
    slighted -- backticks are much more common in Perl code than in
    Python code, at least in my experience.

    Nick

    --
    # sigmask || 0.2 || 20030107 || public domain || feed this to a python
    print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
    Nick Vargish, Oct 8, 2003
    #5
  6. Jeff Bauer wrote:
    > http://www.straightdope.com/mailbag/mscrolllock.html
    >
    > "However, programmers, being loath to let extraneous
    > keys sit unused on a keyboard, have found use for
    > [backquote] as an operator in the LISP and Python
    > programming languages."


    Although in Python, it's now sitting there as an
    almost-unused operator, which isn't much better a
    fate.

    I propose we rescue "`" from this sadly neglected status
    and use it for the matrix multiplication operator that
    was much sought after in certain circles a while back...

    --
    Greg Ewing, Computer Science Dept,
    University of Canterbury,
    Christchurch, New Zealand
    http://www.cosc.canterbury.ac.nz/~greg
    Greg Ewing (using news.cis.dfn.de), Oct 13, 2003
    #6
  7. Nick Vargish wrote:
    >
    > Jeff Bauer <> writes:
    >
    > > if-tim-is-sherlock-then-cecil-must-be-mycroft-ly y'rs,

    >
    > Just a correction; the SD article quoted in the previous post was
    > written by a Staff Reporter ("Una Persson"), not the exalted
    > Cecil Adams himself.
    >
    > I did think it was funny that Python was mentioned, but Perl was
    > slighted -- backticks are much more common in Perl code than in
    > Python code, at least in my experience.
    >

    Hey, the C-shell in UNIX uses backquote also... I do *not*
    know about bash, ksh, or sh.

    --
    +----------------------------------------------------------------+
    | Charles and Francis Richmond richmond at plano dot net |
    +----------------------------------------------------------------+
    Charles Richmond, Oct 26, 2003
    #7
  8. Jeff Bauer

    Nick Vargish Guest

    Charles Richmond <> writes:

    > Hey, the C-shell in UNIX uses backquote also... I do *not*
    > know about bash, ksh, or sh.


    I believe the Bourne shell is where the backticks as "execute string
    and replace with output" began. BTW, you should learn a Bourne shell
    (I like zsh, but bash is okay, ksh and sh are a little basic for
    interactive use) -- very few system scripts are written in C-shell. In
    fact, C-shell programming generally seems to be deprecated in most
    environments.

    Nick

    --
    # sigmask || 0.2 || 20030107 || public domain || feed this to a python
    print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
    Nick Vargish, Oct 27, 2003
    #8
  9. In article <>,
    Nick Vargish <> wrote:
    .
    .
    .
    >interactive use) -- very few system scripts are written in C-shell. In
    >fact, C-shell programming generally seems to be deprecated in most
    >environments.

    .
    .
    .
    <URL: http://frmb.org/csh_whynot.html > canonically
    summarizes why csh programming is naughty and ener-
    vating.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
    Cameron Laird, Oct 27, 2003
    #9
  10. Jeff Bauer

    Guest

    , Oct 27, 2003
    #10
  11. Nick Vargish fed this fish to the penguins on Monday 27 October 2003
    09:47 am:

    > interactive use) -- very few system scripts are written in C-shell. In
    > fact, C-shell programming generally seems to be deprecated in most
    > environments.
    >

    Though, if I may drag in some decade old history, tcsh was quite
    comfortable to someone used to the Amiga's CLI -- no experience with
    actual scripting, but at the interactive level when I had a shell
    account with Netcom, using tcsh minimized confusion between the two
    systems.


    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Bestiaria Home Page: http://www.beastie.dm.net/ <
    > Home Page: http://www.dm.net/~wulfraed/ <
    Dennis Lee Bieber, Oct 28, 2003
    #11
  12. Jeff Bauer

    Nick Vargish Guest

    Dennis Lee Bieber <> writes:

    > Though, if I may drag in some decade old history, tcsh was quite
    > comfortable to someone used to the Amiga's CLI -- no experience with
    > actual scripting, but at the interactive level when I had a shell
    > account with Netcom, using tcsh minimized confusion between the two
    > systems.


    Right, tcsh wasn't bad as an interactive shell; until zsh showed up,
    it was probably the best choice since it had a number of features that
    sh lacked (filename completion being the big one, but the history
    facilities were handy too).

    The papers cited by other posters, which I was too lazy to google for,
    are mostly arguments against programming in (t)csh.

    It's nice to be able to write off-the-cuff scripts on the command line
    in the same language you write your system admin scripts in. That's
    why zsh and bash are so great -- all the interactive features of tcsh
    (and more!) in a regular and sane Bourne syntax.

    Nick

    --
    # sigmask || 0.2 || 20030107 || public domain || feed this to a python
    print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
    Nick Vargish, Oct 28, 2003
    #12
    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. Beza
    Replies:
    2
    Views:
    410
    Kevin Spencer
    Jun 27, 2003
  2. Jordan
    Replies:
    2
    Views:
    2,527
    Jordan
    Feb 10, 2004
  3. Joe Coppola

    Straight ASP problem

    Joe Coppola, Jun 14, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    427
    Joe Coppola
    Jun 14, 2004
  4. Ike

    Feeling like a dope

    Ike, Jun 12, 2006, in forum: Java
    Replies:
    3
    Views:
    400
    Knute Johnson
    Jun 12, 2006
  5. gavino
    Replies:
    1
    Views:
    258
    Luc The Perverse
    Oct 26, 2006
Loading...

Share This Page