andymccurdy/redis-py — pull request #227 by jason-oster (2012-02-28 04:30:48+00:00)
Title: Bug fix for floating point precision in encoded commands.

- str() limits the float precision to a total string length of ~13 characters:
>>> str(1234567890.123456)
'1234567890.12'
>>> str(1234567890123.456)
'1.23456789012e+12'

Fix this by using format():

>>> import time
>>> str(time.time())
'1330403052.79'
>>> format(time.time(), 'f')
'1330403055.444572'

- This patch is especially useful for using high-precision timestamps as the
score in a sorted set.