[Tutor] Re:what is foo From Online Observations
RASTM2 at aol.com
RASTM2 at aol.com
Sat Aug 16 06:38:13 EDT 2003
> From: arkamir at softhome.net
> Subject: [Tutor] what is foo
> To: tutor at python.org
> Message-ID: <courier.3F3D1C47.00006211 at softhome.net>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1"
>
> hey ive been reading several books about python lately and the \y all
> included foo. Can someone please tell me what it is. Thanks
Hello ARKAMIR,
And that is the ultimate question.
What "is" foo?
Foo is sort of like a variable in a sentence or in an example.
A word to take the place of any word.
You just replace "foo" or "bar" or any of many such words with
the "real" words your going to use.
i.e.
>>> def foo(bar):
... if bar:
... print "foo means", bar
...
>>> foo()
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
TypeError: foo() takes exactly 1 argument (0 given)
As you can see from the trace back, foo takes exactly one argument,
so if you don't give it a meaning, it will be meaningless. ; )
>>> foo('this')
# give it a meaning and then
foo means this
# it has a meaning
>>>
Here's a couple good places to find out what "foo" is.
>From Denis Howe's Free On Line Dictionary Of Computing
<A HREF="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?foo">http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?foo</A>
see especially also
Eric S. Raymond's
Jargon File<A HREF="http://www.catb.org/~esr/jargon/html/F/foo.html">
http://www.catb.org/~esr/jargon/html/F/foo.html</A>
Hope this helps and you enjoy the reading.
Ray St. Marie
Rastm2 at users.sourceforge.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20030816/1f539dc5/attachment.htm
More information about the Tutor
mailing list