[Tutor] What is "foo"?
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Sat Apr 9 23:17:39 CEST 2005
> > Foo: What's it good for?
>
> Foo and Bar are popular names used in examples. They don't mean
> anything. For example to show how to define a function I might write
>
> def foo():
> print 'Hello'
>
> I just use foo to avoid having to think of a meaningful name.
Hi Joseph,
I sometimes get lazy and use 'foo' in my own code examples too. But I
find that it's usually a lax idea, precisely because it has no meaning.
Because that "foo" nonsense word confuses beginners quite a bit, I'm
trying to be more conscious to make good variable names, even for
throwaway code, although I sometimes slip.
There's a nice article in the wikipedia that explains Foo:
http://en.wikipedia.org/wiki/Foo
More information about the Tutor
mailing list