PEP proposal for round(x,n) enhancement

Ignacio Vazquez-Abrams ignacio at openservices.net
Mon Sep 17 18:11:06 CEST 2001


On Mon, 17 Sep 2001, Markus Schaber wrote:

> Tim Peters <tim_one at email.msn.com> schrub:
>
> > BTW, complex numbers still have no meaning to round(), so you could
> > use round(x, 3j) to mean "round to 3 significant digits" <wink>.
>
> Ouch.
>
> This "solutions" needs rather complex programmer brains :-)

Naw, just multiply by -1j and take the real component.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list