[Python-3000] callable()
Andrew Koenig
ark-mlist at att.net
Tue Jul 25 16:19:54 CEST 2006
> With your CD example, you need an external resource (the CD itself) in
> order to calculate the hash - in that case, you can't safely defer
> the hash calculation until the first time you know you need it,
> since you don't know whether or not you'll have access to the
> physical CD at that point.
OK. Then instead of a CD, use a (read-only) disk file. The example is
still valid in that case, and avoids the extraneous matter of operator
intervention.
It's still the case that evaluating a hash might be expensive the first time
you do it, so you may want to be able to test whether it can be done and
actually do it only later.
More information about the Python-3000
mailing list