[Python-3000] Adaptation: T->P vs P->P

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Apr 4 04:00:49 CEST 2006


Michael Chermside wrote:

> But if we were to infer that
> anything satisfying "python.as_int" necessarily satisfied "python.as_index",
> then we would have defeated the purpose of the feature.

We just need to keep a clear distinction between "is an integer"
and "convertible to an integer". Python ints, longs, gmpy
integers, etc. would satisfy "is an integer" and be usable
as indexes. Floats, decimals, etc. would satisfy "convertible
to an integer" but not "is an integer" and would therefore
not be usable directly as indexes.

So this isn't an argument against transitivity, just for
being careful about what implies what.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiam!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-3000 mailing list