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

I do wish there were a syntax for Decimal literals, e.g. 0.1D (analogous to 100L as long, etc.). Maybe I'll make it my weekend project even if I don't really expect it to be accepted into CPython proper.


I'm pretty sure the L syntax has gone away in Python3, with numbers being auto-promoted to Long if they're going to overflow. I'm a bit hazy about this, but I think I talked to the maintainer over lunch at PyCon two years ago.


There's actually no externally-visible long type at all in Python 3, it's all done transparently now. That said, I'm not using Python 3. The promoting behavior you speak of is how Python 2 works.


Indeed it has, integers and longs have been unified as a single `int` type, so the external marker is gone as well.




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

Search: