[Python-3000] Rounding in Py3k

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Aug 4 03:51:25 CEST 2006

Nick Coghlan wrote:

> Would it be worthwhile to design a common rounding mechanism that can be used 
> to cleanly round values to the built in floating point type, as well as being 
> able to access the different rounding modes for decimal instances?

Sounds like a job for a new protocol, such as __round__(self, mode, places).


More information about the Python-3000 mailing list