Re: Inheriting from int or long

2007-10-02 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I started creating a simple "bits" class, intended to act like a array | of bits. This was my initial idea, basically just overriding the | string representation to display the bitmask (so far): For this purpose, for the reason you dis

Re: Inheriting from int or long

2007-10-02 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I started creating a simple "bits" class, intended to act like a array > of bits. This was my initial idea, basically just overriding the > string representation to display the bitmask (so far): > > class bits(long): > def __str__ (self): > s = '' >

Inheriting from int or long

2007-10-02 Thread snorble
I started creating a simple "bits" class, intended to act like a array of bits. This was my initial idea, basically just overriding the string representation to display the bitmask (so far): class bits(long): def __str__ (self): s = '' if self == 0L: s += '-'