Lulu of the Lotus-Eaters
mertz at gnosis.cx
Sun Oct 5 21:20:32 CEST 2003
"Terry Reedy" <tjreedy at udel.edu> wrote previously:
|The acid test is to try calling it:
|except TypeError, msg: <do whatever>
This is usually a bad idea though. Many, if not most, things you call
can either have side effects and/or consume non-trivial resources (time,
For example, you don't want to change state by making a call if you know
you are not ready for that state change until something else happens.
But you may want to know whether 'param' is callable before you bother
with the setup code.
Keeping medicines from the bloodstreams of the sick; food from the bellies
of the hungry; books from the hands of the uneducated; technology from the
underdeveloped; and putting advocates of freedom in prisons. Intellectual
property is to the 21st century what the slave trade was to the 16th.
More information about the Python-list