Sleep command
Jeff Shannon
jeff at ccvcorp.com
Fri May 3 17:36:05 EDT 2002
In article <mailman.1020450727.26337.python-list at python.org>,
holger krekel says...
> Jeff Shannon wrote:
> > In article <mailman.1020420187.1268.python-list at python.org>,
> > holger krekel says...
> > >
> > > import time
> > > time.sleep(30)
> > >
> > > and time should stand still for 30 seconds.
> > > btw, i would rather call it 'statement','command' or 'code' than
> > > 'specification'.
> >
> > Picking nits here, but I would call it a function, because that
> > is exactly what it is. I most certainly would *not* call it a
> > statement -- that term has a definite meaning in this context,
> > and sleep() is *not* a statement. :)
>
> picking nits here, but how is 'sleep(30)' or 'time.sleep(30)'
> a function?
Very well, then, sleep (or time.sleep) is a function, which is
called with an argument of 30 in the specified expression.
Whether that expression is a statement or not depends on the
context in which it is placed.
> nit picking is what many of us ware best at on this list, i guess.
> After all it often makes a difference :-)
Yes, it does... and while, at a certain level, 'sleep(30)' could
be seen as technically a statement (but only if it appears on a
line by itself), calling it a statement is likely to lead to
confusion of the inexperienced, when they later learn of the
difference between expressions and statements. For instance,
statements may not be used in a lambda, but 'sleep(30)' could be.
This could confuse someone who has been told that 'sleep(30)' is
a statement.
--
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list