[Tutor] What is foo?

Remco Gerlich scarblac@pino.selwerd.nl
Thu, 11 Apr 2002 11:01:11 +0200


On  0, Ed Hopkins <ed.hopkins@ntlworld.com> wrote:
> Hi,
> 
> Been studying Python for a while.  Even bought a couple of books.  The most
> annoying thing is that nowhere does anyone explain what 'foo' means.
> 
> Any ideas?

Well the Jargon entry maybe over-explains it...

In many code examples, words like that are just used as meaningless
placeholders. You need a variable name, it's just a short example so it
doesn't really have a meaning other than being some variable, name it foo.
If you need another, you'd usually call it bar.

In Python code you'll often see Monty Python things used for this,
especially "spam".

Others just use a,b,c, x,y,z, etc. I used to hack a lot of code with some
Dutch friends, and we used "koe", "aap" en "vla" for this purpose, out of
some drunken tradition no-one remembers.

Anyway, just ignore it, it's not special :)

-- 
Remco Gerlich