Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > OT: The Straight Dope

Reply
Thread Tools

OT: The Straight Dope

 
 
Jeff Bauer
Guest
Posts: n/a
 
      10-07-2003
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

 
Reply With Quote
 
 
 
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      10-07-2003
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

 
Reply With Quote
 
 
 
 
Andrew Dalke
Guest
Posts: n/a
 
      10-07-2003
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
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      10-08-2003
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

 
Reply With Quote
 
Nick Vargish
Guest
Posts: n/a
 
      10-08-2003
Jeff Bauer <(E-Mail Removed)> 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+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
 
Reply With Quote
 
Greg Ewing (using news.cis.dfn.de)
Guest
Posts: n/a
 
      10-13-2003
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

 
Reply With Quote
 
Charles Richmond
Guest
Posts: n/a
 
      10-26-2003
Nick Vargish wrote:
>
> Jeff Bauer <(E-Mail Removed)> 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 |
+----------------------------------------------------------------+
 
Reply With Quote
 
Nick Vargish
Guest
Posts: n/a
 
      10-27-2003
Charles Richmond <(E-Mail Removed)> 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+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
 
Reply With Quote
 
Cameron Laird
Guest
Posts: n/a
 
      10-27-2003
In article <(E-Mail Removed)>,
Nick Vargish <(E-Mail Removed)> 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 <(E-Mail Removed)>
Business: http://www.Phaseit.net
 
Reply With Quote
 
joe@invalid.address
Guest
Posts: n/a
 
      10-27-2003
(E-Mail Removed) (Cameron Laird) writes:

> In article <(E-Mail Removed)>,
> Nick Vargish <(E-Mail Removed)> 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.


Also,

http://www.grymoire.com/Unix/CshTop10.txt
http://www.grymoire.com/Unix/Csh.html#uh-0
Joe
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
P&S dope gets him camera smashed Rich Digital Photography 26 12-13-2008 01:59 AM
is cocoon a hunk of crap? or dope? gavino Java 1 10-26-2006 09:46 PM
Feeling like a dope Ike Java 3 06-12-2006 10:38 PM
Answer this silver serfing dope angler Computer Support 2 12-22-2003 09:35 PM
Send Records Straight To DataTable Beza ASP .Net 2 06-27-2003 02:40 PM



Advertisments