On Fri, Apr 10, 2015 at 2:53 AM, Grant Edwards <invalid@invalid.invalid> wrote: > On 2015-04-09, Chris Angelico <ros...@gmail.com> wrote: > >> For application work, it's usually much better to have an integer >> type like Python's or Pike's int - a signed integer that can never >> overflow. For low-level bit manipulation work, you usually want an >> *unsigned* integer of specific size, with well defined wrap-around >> behaviour. When do you actually want a signed integer with >> well-defined overflow behaviour? > > http://en.wikipedia.org/wiki/Binary_scaling#Binary_angles
Huh, interesting. (Trust the list to have an answer to a rhetorical question, though to be honest, I should have expected that there'd be some.) A cursory glance at that Wikipedia page suggests that unsigned wrap-around can be used just as effectively, though, so I'm not sure this is at all an argument for standardizing the behaviour of signed wrap-around. ChrisA -- https://mail.python.org/mailman/listinfo/python-list