Objects in Python

Chris Angelico rosuav at gmail.com
Sat Aug 25 06:23:46 EDT 2012


On Sat, Aug 25, 2012 at 6:55 PM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> I'm just wondering out aloud if the number of times this type of thread has
> been debated here will fit into a Python long or float?

Well, when I have to store currency information, I like to store it as
an integer, using the native currency's "small unit" (eg the cent in
dollar+cent currencies). In this instance, instead of trying to count
the threads (which would be fractional), just count the number of
posts. It then is an integer, and I've yet to find any integer that
can't be represented as a Python long (or, in 3.x, int).

ChrisA



More information about the Python-list mailing list