On Jul 24, 2:29 pm, Burcin Erocal <[email protected]> wrote: > [...] > At Sage Days 24, I learned that Python allows the user to do arithmetic > with bools: > > In [1]: 5+True > Out[1]: 6 > [...] > Any comments?
Preface: Python is my favorite language. These are just comments, no flames please. However, for the uninitiated, duck-typing does not always follow the principle of least surprise (and of course, any software system gets revised over time, so there are no silver bullet, just choices). Luckily, Python 3.X is working on giving more leeway to the programmer oh so ever slightly inclined to do a teensy tiny bit of type- checking. For example: http://www.python.org/dev/peps/pep-3119/ -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
