David Coffin <[EMAIL PROTECTED]> wrote: > I'd like to subclass int to support list access, treating the integer > as if it were a list of bits.
Fine, but: > Assigning bits to particular indices involves changing the value of > the integer itself, but changing 'self' obviously just alters the ...integers are immutable, like all other numbers in Python: there is NO way to "change the value of the integer itself". I originally proposed to have "mutable numbers" (at least optionally) in gmpy, but the reaction was a broadside against the idea, to the point that I never got around to it -- gmpy includes a lot of functionality for bit-level manipulation, but still only with immutable bitlists (mapped into gmpy.mpz instances). Alex -- http://mail.python.org/mailman/listinfo/python-list