This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Decimal.py enhancements
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: facundobatista, rhettinger
Priority: normal Keywords: patch

Created on 2004-10-08 17:49 by facundobatista, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
decimal.py facundobatista, 2004-10-08 17:49 Changed decimal.py file
diff_decimal.txt facundobatista, 2004-10-08 17:50 Diff file between the posted decimal.py and the CVS version
Messages (3)
msg47028 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2004-10-08 17:49
Raymond:

Changed the _fix and _fixexponents semantics according
to how they were used by the module, which simplifies
several things (less checks to see if "something" is
None, skipped the check for _is_special at the start of
_fixexponents, etc...).

Also skipped copying ``self`` in _fix() before calling
_fixexponents() (which already makes a copy of it). And
made some style fixups.

The tests passed ok, showing a 4% speedup.

I'm posting this like a patch and not doing a direct
commit to you to check if another change to the code
(with this speedup) is valuable.

.    Facundo
msg47029 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2004-10-08 17:50
Logged In: YES 
user_id=752496

Posting the diff file.
msg47030 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-10-09 07:11
Logged In: YES 
user_id=80475

Accepted and applied with minor modifications:
   Lib/decimal.py 1.26
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40994
2004-10-08 17:49:43facundobatistacreate