@@ -2899,12 +2899,11 @@ Decimal.from_float(0.1) is not the same as Decimal('0.1').
28992899 Decimal('Infinity')
29002900 >>> Decimal.from_float(float('-inf'))
29012901 Decimal('-Infinity')
2902-
29032902[clinic start generated code]*/
29042903
29052904static PyObject *
29062905_decimal_Decimal_from_float_impl (PyTypeObject * type , PyObject * pyfloat )
2907- /*[clinic end generated code: output=e62775271ac469e6 input=31302a9a4c1d9c99 ]*/
2906+ /*[clinic end generated code: output=e62775271ac469e6 input=052036648342f8c8 ]*/
29082907{
29092908 PyObject * context ;
29102909 PyObject * result ;
@@ -3807,15 +3806,15 @@ dec_as_long(PyObject *dec, PyObject *context, int round)
38073806/*[clinic input]
38083807_decimal.Decimal.as_integer_ratio
38093808
3810- Return a pair of integers, whose ratio is exactly equal to the original.
3809+ Return a pair of integers whose ratio is exactly equal to the original.
38113810
3812- The ratio is in lowest terms and with a positive denominator. Raise
3813- OverflowError on infinities and a ValueError on NaNs.
3811+ The ratio is in lowest terms and with a positive denominator.
3812+ Raise OverflowError on infinities and a ValueError on NaNs.
38143813[clinic start generated code]*/
38153814
38163815static PyObject *
38173816_decimal_Decimal_as_integer_ratio_impl (PyObject * self )
3818- /*[clinic end generated code: output=c5d88e900080c264 input=3a4819b9484919d5 ]*/
3817+ /*[clinic end generated code: output=c5d88e900080c264 input=7861cb643f01525a ]*/
38193818{
38203819 PyObject * numerator = NULL ;
38213820 PyObject * denominator = NULL ;
@@ -3971,9 +3970,9 @@ _decimal.Decimal.to_integral_exact
39713970 rounding: object = None
39723971 context: object = None
39733972
3974- Rounds to a nearby integer.
3973+ Round to the nearest integer.
39753974
3976- Round to the nearest integer, signaling Inexact or Rounded as appropriate if
3975+ Decimal.to_integral_exact() signals Inexact or Rounded as appropriate if
39773976rounding occurs. The rounding mode is determined by the rounding parameter
39783977if given, else by the given context. If neither parameter is given, then the
39793978rounding mode of the current default context is used.
@@ -3982,7 +3981,7 @@ rounding mode of the current default context is used.
39823981static PyObject *
39833982_decimal_Decimal_to_integral_exact_impl (PyObject * self , PyObject * rounding ,
39843983 PyObject * context )
3985- /*[clinic end generated code: output=8b004f9b45ac7746 input=e98e6aabbc97a92c ]*/
3984+ /*[clinic end generated code: output=8b004f9b45ac7746 input=edd30a9f06aed70b ]*/
39863985{
39873986 PyObject * result ;
39883987 uint32_t status = 0 ;
@@ -4661,13 +4660,13 @@ _decimal.Decimal.radix
46614660
46624661Return Decimal(10).
46634662
4664- I.e. return the radix (base) in which the Decimal class does
4663+ This is the radix (base) in which the Decimal class does
46654664all its arithmetic. Included for compatibility with the specification.
46664665[clinic start generated code]*/
46674666
46684667static PyObject *
46694668_decimal_Decimal_radix_impl (PyObject * self )
4670- /*[clinic end generated code: output=6b1db4c3fcdb5ee1 input=c25ca314723040ed ]*/
4669+ /*[clinic end generated code: output=6b1db4c3fcdb5ee1 input=18b72393549ca8fd ]*/
46714670{
46724671 decimal_state * state = get_module_state_by_def (Py_TYPE (self ));
46734672 return _dec_mpd_radix (state );
@@ -4784,14 +4783,13 @@ Engineering notation has an exponent which is a multiple of 3, so there are up
47844783to 3 digits left of the decimal place. For example, Decimal('123E+1') is
47854784converted to Decimal('1.23E+3').
47864785
4787- The value of context.capitals determines whether the exponent sign is lower or
4788- upper case. Otherwise, the context does not affect the operation.
4789-
4786+ The value of context.capitals determines whether the exponent sign is lower
4787+ or upper case. Otherwise, the context does not affect the operation.
47904788[clinic start generated code]*/
47914789
47924790static PyObject *
47934791_decimal_Decimal_to_eng_string_impl (PyObject * self , PyObject * context )
4794- /*[clinic end generated code: output=d386194c25ffffa7 input=fac5029cbf436bd5 ]*/
4792+ /*[clinic end generated code: output=d386194c25ffffa7 input=36436cb7973dd5d0 ]*/
47954793{
47964794 PyObject * result ;
47974795 mpd_ssize_t size ;
@@ -4822,22 +4820,22 @@ _decimal.Decimal.copy_sign
48224820 other: object
48234821 context: object = None
48244822
4825- Returns self with the sign of other.
4823+ Return a copy of * self* with the sign set to be the same as the sign of * other* .
48264824
48274825For example:
48284826
48294827 >>> Decimal('2.3').copy_sign(Decimal('-1.5'))
48304828 Decimal('-2.3')
48314829
48324830This operation is unaffected by context and is quiet: no flags are changed
4833- and no rounding is performed. As an exception, the C version may raise
4831+ and no rounding is performed. As an exception, the C version may raise
48344832InvalidOperation if the second operand cannot be converted exactly.
48354833[clinic start generated code]*/
48364834
48374835static PyObject *
48384836_decimal_Decimal_copy_sign_impl (PyObject * self , PyObject * other ,
48394837 PyObject * context )
4840- /*[clinic end generated code: output=72c62177763e012e input=f02ebb5d7489c502 ]*/
4838+ /*[clinic end generated code: output=72c62177763e012e input=96b620d142ed80a9 ]*/
48414839{
48424840 PyObject * a , * b ;
48434841 PyObject * result ;
@@ -4873,15 +4871,15 @@ _decimal.Decimal.same_quantum
48734871
48744872Test whether self and other have the same exponent or whether both are NaN.
48754873
4876- This operation is unaffected by context and is quiet: no flags are changed and
4877- no rounding is performed. As an exception, the C version may raise
4874+ This operation is unaffected by context and is quiet: no flags are changed
4875+ and no rounding is performed. As an exception, the C version may raise
48784876InvalidOperation if the second operand cannot be converted exactly.
48794877[clinic start generated code]*/
48804878
48814879static PyObject *
48824880_decimal_Decimal_same_quantum_impl (PyObject * self , PyObject * other ,
48834881 PyObject * context )
4884- /*[clinic end generated code: output=c0a3a046c662a7e2 input=0930e11241231ac2 ]*/
4882+ /*[clinic end generated code: output=c0a3a046c662a7e2 input=d583092dec58453e ]*/
48854883{
48864884 PyObject * a , * b ;
48874885 PyObject * result ;
@@ -4913,10 +4911,7 @@ _decimal.Decimal.quantize
49134911 rounding: object = None
49144912 context: object = None
49154913
4916- Quantize self so its exponent is the same as that of exp.
4917-
4918- Return a value equal to the first operand after rounding and having the
4919- exponent of the second operand.
4914+ Return a value equal to *self* after rounding, with the exponent of *other*.
49204915
49214916 >>> Decimal('1.41421356').quantize(Decimal('1.000'))
49224917 Decimal('1.414')
@@ -4938,7 +4933,7 @@ argument is given, the rounding mode of the current thread's context is used.
49384933static PyObject *
49394934_decimal_Decimal_quantize_impl (PyObject * self , PyObject * w ,
49404935 PyObject * rounding , PyObject * context )
4941- /*[clinic end generated code: output=5e84581f96dc685c input=eed2fdd8d65fce21 ]*/
4936+ /*[clinic end generated code: output=5e84581f96dc685c input=2053ebf488a665dc ]*/
49424937{
49434938 PyObject * a , * b ;
49444939 PyObject * result ;
0 commit comments