fiorix/cyclone — pull request #48 by jason-oster (2012-03-03 21:32:18+00:00)
Title: Bug fix for floating point precision in encoded commands.

- str() limits the float precision to a total string length of ~13 character

>>> 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.
- See also: https://github.com/andymccurdy/redis-py/pull/227#issuecomment-4300413