On Dec 1, 2009, at 11:08 AM, Martin v. Löwis wrote:

>>> I'd rather prefer to explicitly list what CPython assumes about the
>>> outcome of specific operations. If this is just about &, |, ^, and ~,
>>> then its fine with me.
>> 
>> I'm not even interested in going this far:
> 
> I still am: with your list of assumptions, it is unclear (to me, at
> least) what the consequences are. So I'd rather see an explicit list
> of consequences, instead of buying a pig in a poke.

I think all that needs to be defined is that conversion from unsigned to 
signed, and (negative) signed to unsigned integers have 2's complement wrapping 
semantics, and does not affect the bit pattern in memory.

Stating it that way makes it clearer that all you're assuming is the operation 
of the cast operators, and it seems to me that it implies the other 
requirements.

James
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to