A possible change to decimal.Decimal?

A. Lloyd Flanagan A.Lloyd.Flanagan at gmail.com
Sun Mar 4 07:37:05 EST 2012


On Friday, March 2, 2012 6:49:39 PM UTC-5, Ethan Furman wrote:
> Jeff Beardsley wrote:
> > HISTORY:  
...
> 
> What you should be doing is:
> 
>    import decimal
>    from decimal import Decimal
> 
>    reload(decimal)
>    Decimal = decimal.Decimal   # (rebind 'Decimal' to the reloaded code)
> 
> ~Ethan~

Agree that's how the import should be done. On the other hand, removing gratuitous use of isinstance() is generally a Good Thing.



More information about the Python-list mailing list