Round python decimal to nearest 0.05
<p>I'm trying to round money numbers in Decimal to the nearest 0.05. Right now, I'm doing this:</p>

<pre><code>def round_down(amount):
    amount *= 100
    amount = (amount - amount % 5) / Decimal(100)
    return Decimal(amount)

def round_up(amount):
    amount = int(math.ceil(float(100 * amount) / 5)) * 5 / Decimal(100)
    return Decimal(amount)
</code></pre>

<p>Is there any way I can do this more elegantly without dealing with floats using python Decimals (using quantize perhaps)?</p>