[SciPy-dev] Is "bool" the right name?

David M. Cooke cookedm at physics.mcmaster.ca
Mon Oct 31 12:15:00 CST 2005

On Oct 31, 2005, at 12:24, Travis Oliphant wrote:
> Todd Miller wrote:
>> Trying to add some newcore compatibility to numarray,  I bowled  
>> through
>> the obvious name collision between the new numarray "bool" and the
>> Python scalar type "bool."   The name collision is easy enough to  
>> work
>> around in the numarray internals,  but it occurred to me that "bool8"
>> might be a better name since it is more explicit, consistent with the
>> other type names,  and clearly resolves the recurring question "Is  
>> this
>> a 1-bit bool or not?".
>> So,  while newcore is still young,  does it make sense to rename  
>> "bool"
>> to "bool8"?
> Actually, I renamed everything that was conflicting with standard  
> Python
> types with an appended underscore.

... and I also added an __all__ to scipy.base.numerictypes that  
doesn't export the Python types (this is probably what Christopher  
Hanley ran in to). I get real nervous overwriting builtin types like  
that, even though it's supposedly it's the same object. Static  
checkers (like pylint; haven't got pychecker to work right yet)  
complain mightly when that happens.

|David M. Cooke              http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the Scipy-dev mailing list