On 10 January 2012 20:46, Joachim Durchholz <[email protected]> wrote:
> Am 10.01.2012 18:50, schrieb [email protected]: > > I found it here > http://www.python.org/dev/**peps/pep-0357/<http://www.python.org/dev/peps/pep-0357/> >> >> So in conclusion it's a good thing that int(expression) does not work. >> Rounding should be as explicit as possible. >> > > I read the opposite: > > __int__() is the potentially lossy conversion to an integer. > __index__() is a lossless check/conversion to an integer; if that is not > possible, it should return None (which will raise a TypeError in the > caller, usually). > > You are right, but __index__ exists because of a presumably bad convention for __int__. Anyway, I don't anymore feel that there is a strong need for __int__ or __index__. If somebody implements them I'll be +0 (maybe +0.5). > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to sympy+unsubscribe@** > googlegroups.com <sympy%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/sympy?hl=en <http://groups.google.com/group/sympy?hl=en>. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
