Ka-Ping Yee <python-dev at zesty.ca>: > The extra method should be specifically for the exceptional case, > and named appropriately. > > Decimal.exact_float(value) That's a confusing name, since it seems to be promising that the conversion will be exact. While this might technically be true for certain values of float, there's no way the implementation can know whether the result is exactly what the user had in mind for the meaning of that float. I think the name from_float is fine, since it says "I know constructing a Decimal from a float isn't necessarily exact, but I want to do it anyway, and I'm prepared to accept the result, whatever it is." Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4