En Sat, 06 Feb 2010 22:34:14 -0300, bartc <ba...@freeuk.com> escribió:
"Arnaud Delobelle" <arno...@googlemail.com> wrote in message news:m28wb6ypfs....@googlemail.com...
"Gabriel Genellina" <gagsl-...@yahoo.com.ar> writes:

Note the *literal* part. If you (the programmer) is likely to know the
parameter value when writing the code, then the function is actually two
separate functions.

Thanks, I understand what Steve Holden meant now.

I've just noticed that 'literal' part. But I think I still disagree.

For a real-world example, it means instead of having a room with a light-switch in it, if I *know* I want the light on or off, I should have two rooms: one with the light permanently on, and one with it permanently off, and just walk into the right one.

I think this would be a better analogy: A multiple screwdriver like this one
http://img.alibaba.com/photo/204461747/Multi_function_screwdriver_screwdriver.jpg
You use it when you need flexibility, or you don't know in advance what kind of screws you're going to encounter; they're mostly for hobbysts.
On the other hand, you have separate tools like this:
http://i277.photobucket.com/albums/kk43/hightecelectronica/021-482.jpg
You choose one of them when you know exactly what you want. If the stuff you're working on uses exclusively certain kind of screws, you don't need flexibility, and you can choose in advance. They're also professional's choice.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to