[PYTHON-CRYPTO] Requirements

Jeremy Hylton jeremy at alum.mit.edu
Tue Feb 13 03:53:34 CET 2001

>>>>> "R$" == Rich Salz <rsalz at CAVEOSYSTEMS.COM> writes:

  >> > * At least in debug mode an exception should be raised if the
  >> > application passes wrong types of parameters to class methods
  >> > of the API.
  >> I think this should be done all of the time, not just in debug
  >> mode.  I'm curious, why do you say "at least in debug mode"?  Is
  >> there an example that you have in mind where you wouldn't want to
  >> know this information?

  R$> Sure.  Once my code is written I do not want to pay the overhead
  R$> of run-time typechecking.

I agree.  The Python standard library does very minimal
type-checking.  Instead, the philosophy is that if a user supplies an
argument of the wrong type, an exception will be raised when the value
is actually used.  In many cases, the traceback is as clear as one
generated by an explicit type check.


More information about the python-crypto mailing list