On Jul 25, 1:50 am, Marco Streng wrote:
> [...]
> I like the TypeError here to avoid bugs, but don't mind following
> python convention either.
http://docs.python.org/library/warnings.html
Maybe using (soft) warnings in the interim (while maintaining
workarounds) could be a compromise between g
An earlier topic on the same problem is
http://groups.google.com/group/sage-devel/browse_thread/thread/2821c770f3c62efd
Apparently True*2 was fixed (now returns 2), but True*SR(2) wasn't
(still returns 1). I think Robert Bradshaw made the patch back then,
so he knows how to fix this (something to
On Jul 24, 2:29 pm, Burcin Erocal 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 u
if True means 1, then can you use
1 as a truth value in a conditional expression?
In which case 0 would be false.
What would 2 or 3 mean?
Lisp distinguishes numbers from nil. Usually nil means false, (though
in Scheme, there is
another "false" value and nil means the empty list.
However, anythi