[Python-checkins] python/dist/src/Lib decimal.py,1.7,1.8

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Mon Jul 5 01:37:03 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2545

Modified Files:
	decimal.py 
Log Message:
* Fixup docstrings
* Make capitals default part of DefaultContext



Index: decimal.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/decimal.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** decimal.py	4 Jul 2004 13:53:24 -0000	1.7
--- decimal.py	5 Jul 2004 05:36:39 -0000	1.8
***************
*** 135,139 ****
  import threading
  import copy
- import math
  import operator
  
--- 135,138 ----
***************
*** 2121,2126 ****
      capitals -      If 1, 1*10^1 is printed as 1E+1.
                      If 0, printed as 1e1
!                     (Defaults to 1)
!     clamp - If 1, change exponents if too high (Default 0)
      """
  
--- 2120,2124 ----
      capitals -      If 1, 1*10^1 is printed as 1E+1.
                      If 0, printed as 1e1
!     _clamp - If 1, change exponents if too high (Default 0)
      """
  
***************
*** 2131,2135 ****
                   _rounding_decision=None,
                   Emin=None, Emax=None,
!                  capitals=1, _clamp=0,
                   _ignored_flags=[]):
          if flags is None:
--- 2129,2133 ----
                   _rounding_decision=None,
                   Emin=None, Emax=None,
!                  capitals=None, _clamp=0,
                   _ignored_flags=[]):
          if flags is None:
***************
*** 2209,2213 ****
  
      def Etop(self):
!         """Returns maximum exponent (= Emin - prec + 1)"""
          return int(self.Emax - self.prec + 1)
  
--- 2207,2211 ----
  
      def Etop(self):
!         """Returns maximum exponent (= Emax - prec + 1)"""
          return int(self.Emax - self.prec + 1)
  
***************
*** 2431,2435 ****
  
      def normalize(self, a):
!         """normalize reduces its operand to its simplest form.
  
          Essentially a plus operation with all trailing zeros removed from the
--- 2429,2433 ----
  
      def normalize(self, a):
!         """normalize reduces an operand to its simplest form.
  
          Essentially a plus operation with all trailing zeros removed from the
***************
*** 2969,2973 ****
          _rounding_decision=ALWAYS_ROUND,
          Emax=DEFAULT_MAX_EXPONENT,
!         Emin=DEFAULT_MIN_EXPONENT
  )
  
--- 2967,2972 ----
          _rounding_decision=ALWAYS_ROUND,
          Emax=DEFAULT_MAX_EXPONENT,
!         Emin=DEFAULT_MIN_EXPONENT,
!         capitals=1
  )
  




More information about the Python-checkins mailing list