Typing system vs. Java

Chris Barker chrishbarker at home.net
Thu Aug 2 15:09:39 EDT 2001


Terry Reedy wrote:
> "Donn Cave" <donn at u.washington.edu> wrote in message
> news:9ka118$mj8$1 at nntp6.u.washington.edu...
> > And the run time error is a TypeError: unsubscriptable object.
> > He's baffled enough by this to post to comp.lang.python instead
> > of figure it out himself.
> 
> What we need here are better error messages: a more explicit 'none
> object is not subscriptable' might have steered him to the problem.

That would help, as would any number of debugging techniques that any
Python programmer with any experience would know. However, these would
only work if, in fact the author checked his code with invalid data. It
could be a long time before an error like that was found. Frankly, not
thinking to handle the case of invalid data would be likely to bite you
in any language, and I imagine that it is rare that type checking would
find it very often.

-Chris



-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list