PEP 3107 and stronger typing (note: probably a newbie question)
Hamilton, William
whamil1 at entergy.com
Thu Jul 5 08:48:39 EDT 2007
> From: Paul Rubin
>
> greg <greg at cosc.canterbury.ac.nz> writes:
> > > E.g. your program might pass its test and run properly for years
> > > before some weird piece of input data causes some regexp to not
quite
> > > work.
> >
> > Then you get a bug report, you fix it, and you add a test
> > for it so that particular bug can't happen again.
>
> Why on earth would anyone prefer taking a failure in the field over
> having a static type check make that particular failure impossible?
Because static typechecking won't make that particular failure
"impossible," but instead just change it from a type error into a data
error that may or may not be harder to identify. If your program gets a
piece of data that breaks it, you'll get a failure in the field. Static
typechecking won't prevent that.
--
-Bill Hamilton
More information about the Python-list
mailing list