By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Unsupported operator for Decimal: + (or -)

P: n/a
This seems to have come up earlier...

http://mail.python.org/pipermail/pyt...ly/451187.html

but no resolution.

We're seeing the same thing. We're using Django's DecimalField type
and when we try to add or subtract values--which should be
decimal.Decimal objects--we occasionally get an error about the
operator not being supported. It doesn't always happen and we can't
seem to reproduce it when we try to.

Has anybody else seen this or is it just the original poster and me?

Todd
Nov 27 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Todd O'Bryan schrieb:
This seems to have come up earlier...

http://mail.python.org/pipermail/pyt...ly/451187.html

but no resolution.

We're seeing the same thing. We're using Django's DecimalField type
and when we try to add or subtract values--which should be
decimal.Decimal objects--we occasionally get an error about the
operator not being supported. It doesn't always happen and we can't
seem to reproduce it when we try to.
Try putting an try/except clause around the problem that drops into the
debugger:
try:
foo = a - b
except TypeError:
import pdb; pdb.set_trace()

Then you can see what a & b _really_ are.

Diez
Nov 27 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.