[Types-sig] Type checks

Tim Peters tim_one@email.msn.com
Thu, 30 Dec 1999 01:09:36 -0500


[John Skaller]
> ...
> There is some indeterminism with bitwise operators (depends
> on the underlying C implementation, which sucks :-)

If you know of a platform dependence in longs, it's a bug.

Ditto for ints, unless it's one of the handful of shift cases that depends
on the native C long size (but, e.g., that Python's right shift sign-extends
is guaranteed regardless of what the platform C does with right shifts;
ditto for mixing signs across / and %; etc).

If you know of a bug, report it!

>> Errors in Python raise exceptions. That is how it is defined,
>> and that is the general style/pattern for the language.

> 	Not true for assertions.
> And type constraints are assertions.

John, you're not getting anywhere with this approach -- drop it.  This is
not the ISO C++ committee, and we're not bound by the latter's conventions &
conceits.  The behavior of assertions in Python depends on the setting of a
processor option.  The notion that "you can't do that!!" is an arbitrary
rule you're carrying in from C++ (*they* can't do that, because that's the
rule *they* agreed to live by -- we did not, and all evidence says nobody
else here is about to).

The Python language does not define the means by which processor options are
specified, but does define their effects.  It is not required that a
processor implement the processor option that we informally refer to as "-O
mode" -- but if it does, its effect is defined.

it's-not-hard-to-read-between-the-lines-when-they're-a-
    kilometer-apart<wink>-ly y'rs  - tim