Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83394 > unrolled thread
| Started by | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| First post | 2015-01-09 13:43 +1100 |
| Last post | 2015-01-09 13:43 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Decimals and other numbers Ben Finney <ben+python@benfinney.id.au> - 2015-01-09 13:43 +1100
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2015-01-09 13:43 +1100 |
| Subject | Re: Decimals and other numbers |
| Message-ID | <mailman.17498.1420771428.18130.python-list@python.org> |
Devin Jeanpierre <jeanpierreda@gmail.com> writes: > decimal.InvalidOperation: 0 ** 0 > > I'd file a bug report but I'm anticipating some rational (heh) > explanation. Any ideas? First note that it's explicitly documented as an invalid operation <URL:file:///usr/share/doc/python3-doc/html/library/decimal.html#decimal.InvalidOperation>. So someone has at least thought about it and deliberately decided it should be so. Why that should be, I don't know; I think the correct behaviour is for ‘0 ** 0 == 1’. But perhaps someone else has a better explanation for why Decimal should behave differently from ‘int’ and ‘float’ here. -- \ “I bought a self learning record to learn Spanish. I turned it | `\ on and went to sleep; the record got stuck. The next day I | _o__) could only stutter in Spanish.” —Steven Wright | Ben Finney
Back to top | Article view | comp.lang.python
csiph-web