[Tutor] code works in windows command but not ubuntu terminal

Steven D'Aprano steve at pearwood.info
Sat Jan 25 05:14:40 CET 2014


On Fri, Jan 24, 2014 at 10:28:09PM -0500, bob gailer wrote:

> And please call () parends and [] brackets, and{} braces. Saves a lot of 
> confusion.

If you think that parentheses are spelt with a "d", you're certainly 
confused :-)

They're all brackets. Often the type of bracket doesn't matter, but when 
it does, adjectives do a perfectly fine job at distinguishing one from 
the other: round brackets, square brackets, and curly brackets are 
well-known and in common use all over the Commonwealth, and have been 
established since the mid 1700s.

As a sop to Americans, who I understand are easily confused by ordinary 
English *wink*, the Unicode consortium describes () as parentheses:

py> unicodedata.name("(")
'LEFT PARENTHESIS'

but [] and {} are described as brackets:

py> unicodedata.name("[")
'LEFT SQUARE BRACKET'
py> unicodedata.name("{")
'LEFT CURLY BRACKET'

As are angle brackets:

py> unicodedata.lookup("LEFT ANGLE BRACKET")
'〈'
py> unicodedata.lookup("RIGHT ANGLE BRACKET")
'〉'

HTML uses ASCII less-than and greater-than signs as angle brackets.

Physicists even have a pun about them, with "bra-ket" notation for 
quantum state:

http://en.wikipedia.org/wiki/Bra-ket_notation

There are a number of other types of brackets with more specialised 
uses, or common in Asian texts. See http://en.wikipedia.org/wiki/Bracket

By the way, the word "bracket" itself is derived from the French and 
Spanish words for "codpiece". That's not relevant to anything, I just 
thought I'd mention it.


-- 
Steven


More information about the Tutor mailing list