[Numpy-discussion] Re: Shouldn't bool_ derive from bool?

Sasha ndarray at mac.com
Wed Jan 18 11:29:05 CST 2006

Oops, bool cannot be subclassed in python, but bool is a subclass of
int, so it makes sense to derive from int_, only which int?  In python
bool inherits all number methods from int and overrides only and, or,
and xor.  Maybe bool_ can do the same ...

-- sasha

On 1/18/06, Sasha <ndarray at mac.com> wrote:
> >>> from numpy import *
> >>> isinstance(bool_(True), bool)
> False

More information about the Numpy-discussion mailing list