On Mon, Aug 10, 2009 at 9:45 PM, Greg Ewing<[email protected]> wrote: > Christopher Barker wrote: > >> I wonder why anyone would want to check on access -- this is different >> than bounds checking -- either the code can handle a None, or it can't. > > To catch bugs. You're right that correct code shouldn't > need it (unless you catch the exception and do something > else, but I wouldn't recommend that -- testing for None > explicitly beforehand will be much more efficient). >
I'm 100% on Greg's side... It's so easy to forget the "... not None" bit ... -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
