On Sep 14, 9:30 am, Mark Morss <[EMAIL PROTECTED]> wrote: > I would like to construct a class that includes both the integers and > None. I desire that if x and y are elements of this class, and both > are integers, then arithmetic operations between them, such as x+y, > return the same result as integer addition. However if either x or y > is None, these operations return None.
Rather than subclassing int, why not just make a singleton NaN object with overloaded arithmetic operators that all return NaN? -- http://mail.python.org/mailman/listinfo/python-list