Python

Monday, May 28th, 2007

I didn’t know this about the Python programming language:

An important goal of the Python developers is making Python fun to use. This is reflected in the origin of the name (after the television series Monty Python’s Flying Circus), in the common practice of using Monty Python references in example code, and in an occasionally playful approach to tutorials and reference materials. For example, the metasyntactic variables often used in Python literature are spam and eggs, instead of the traditional foo and bar.

(Hat tip to Todd, who didn’t know it either.)

Incidentally, I hadn’t heard foo referred to as a metasyntactic variable either:

Foo is the canonical metasyntactic variable, commonly used to represent an as-yet-unspecified term, value, process, function, destination or event but seldom a person (see Ned Baker). It is sometimes combined with bar to make foobar. This suggests that foo may have originated with the World War II slang term fubar, as an acronym for fucked/fouled/fixed up beyond all recognition/repair, although the Jargon File makes a reasonably good case that foo predates fubar. Foo was also used as a nonsense word in the surrealistic comic strip Smokey Stover that was popular in the 1940s and 1950s.

The popularity of foo and its derivatives with computer programmers and hackers was likely increased by its appearance in the classic 1976 Colossal Cave Adventure, found on almost every mainframe and mini-computer through the 1970s and 80′s, where the graffiti “fee fie foe foo [sic]” is seen in the Giants’ Cave.

Another usage of foo is as an abbreviation of the phrase “forward observation officer” (or observer). Apparently FOOs used to go places well forward of normal troops in battle and leave a stylised chalk graffiti of a person looking over a wall with the words “foo was here”.

Leave a Reply