Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Whether or not SymPy gives int(1)/int(2) as a float or Python gives int(1)/int(2) as an integer are wholly different things.

In the context of a programming language, I have to agree with wyldfire that int-on-int operations should yield integers.

Now if SymPy wanted to override the base behavior, I think they absolutely should! I could even understand that the context of symbolic math makes this the least surprising outcome.

But Python is a programming language, not a Domain Specific Language.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: