do...until wisdom needed...
Steve Lamb
grey at despair.rpglink.com
Mon Apr 16 12:19:42 EDT 2001
On Mon, 16 Apr 2001 15:47:17 -0000, Steve Lamb <grey at despair.rpglink.com> wrote:
>print("I'm a packet!") unless (packet_loss);
[snippage]
>In perl there are 4 ways to express the above simple example, 4 different
>things that need to be learned.
Hmmm, as always upon rereading I realized that I was wrong in saying 4.
Forgiving the differences once can have in indention...
statement unless (condition)
statement if (!condition)
statement if (not condition)
unless (condition){statement}
if (!condition) {statement}
if (not condition) {statement}
6. I forgot about ! versus not. Now, raise your hand if you know that
there is a difference between ! and not. Keep it raised if you can, without
looking at any reference book, explain the exact difference between ! and not.
Keep it raised if you can further explain the differences (if any) between
not, ! and unless in the above examples. Remember, no peeking at a book.
--
Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
ICQ: 5107343 | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------
More information about the Python-list
mailing list