Skip to content

Commit 7a87fce

Browse files
committed
Convert hold= parameter to bint at function call
1 parent f4adc25 commit 7a87fce

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/sage/symbolic/expression.pyx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6739,7 +6739,7 @@ cdef class Expression(Expression_abc):
67396739
# Basic arithmetic wrappers
67406740
# which allow disabling automatic evaluation with the hold parameter
67416741
############################################################################
6742-
def power(self, exp, hold=False):
6742+
def power(self, exp, bint hold=False):
67436743
"""
67446744
Return the current expression to the power ``exp``.
67456745
@@ -6762,7 +6762,7 @@ cdef class Expression(Expression_abc):
67626762
g_hold2_wrapper(g_power_construct, self._gobj, nexp._gobj,
67636763
hold))
67646764

6765-
def add(self, *args, hold=False):
6765+
def add(self, *args, bint hold=False):
67666766
"""
67676767
Return the sum of the current expression and the given arguments.
67686768
@@ -6794,7 +6794,7 @@ cdef class Expression(Expression_abc):
67946794
vec.push_back((<Expression>nargs[i])._gobj)
67956795
return new_Expression_from_GEx(self._parent, g_add_construct(vec, hold))
67966796

6797-
def mul(self, *args, hold=False):
6797+
def mul(self, *args, bint hold=False):
67986798
"""
67996799
Return the product of the current expression and the given arguments.
68006800
@@ -8297,7 +8297,7 @@ cdef class Expression(Expression_abc):
82978297
sig_off()
82988298
return new_Expression_from_GEx(self._parent, r)
82998299

8300-
def abs(self, hold=False):
8300+
def abs(self, bint hold=False):
83018301
"""
83028302
Return the absolute value of this expression.
83038303
@@ -8333,7 +8333,7 @@ cdef class Expression(Expression_abc):
83338333
return new_Expression_from_GEx(self._parent,
83348334
g_hold_wrapper(g_abs, self._gobj, hold))
83358335

8336-
def step(self, hold=False):
8336+
def step(self, bint hold=False):
83378337
"""
83388338
Return the value of the unit step function, which is 0 for
83398339
negative x, 1 for 0, and 1 for positive x.
@@ -8365,7 +8365,7 @@ cdef class Expression(Expression_abc):
83658365
return new_Expression_from_GEx(self._parent,
83668366
g_hold_wrapper(g_step, self._gobj, hold))
83678367

8368-
def csgn(self, hold=False):
8368+
def csgn(self, bint hold=False):
83698369
"""
83708370
Return the sign of ``self``, which is -1 if ``self < 0``, 0 if
83718371
``self == 0``, and 1 if ``self > 0``, or unevaluated when ``self`` is a
@@ -8410,7 +8410,7 @@ cdef class Expression(Expression_abc):
84108410
return new_Expression_from_GEx(self._parent,
84118411
g_hold_wrapper(g_csgn, self._gobj, hold))
84128412

8413-
def conjugate(self, hold=False):
8413+
def conjugate(self, bint hold=False):
84148414
"""
84158415
Return the complex conjugate of this symbolic expression.
84168416
@@ -8501,7 +8501,7 @@ cdef class Expression(Expression_abc):
85018501
"""
85028502
return (self*self.conjugate()).expand()
85038503

8504-
def real_part(self, hold=False):
8504+
def real_part(self, bint hold=False):
85058505
"""
85068506
Return the real part of this symbolic expression.
85078507
@@ -8568,7 +8568,7 @@ cdef class Expression(Expression_abc):
85688568

85698569
real = real_part
85708570

8571-
def imag_part(self, hold=False):
8571+
def imag_part(self, bint hold=False):
85728572
r"""
85738573
Return the imaginary part of this symbolic expression.
85748574
@@ -8635,7 +8635,7 @@ cdef class Expression(Expression_abc):
86358635

86368636
imag = imag_part
86378637

8638-
def sqrt(self, hold=False):
8638+
def sqrt(self, bint hold=False):
86398639
"""
86408640
Return the square root of this expression.
86418641
@@ -8703,7 +8703,7 @@ cdef class Expression(Expression_abc):
87038703
return new_Expression_from_GEx(self._parent,
87048704
g_hold2_wrapper(g_power_construct, self._gobj, g_ex1_2, hold))
87058705

8706-
def sin(self, hold=False):
8706+
def sin(self, bint hold=False):
87078707
"""
87088708
EXAMPLES::
87098709
@@ -8756,7 +8756,7 @@ cdef class Expression(Expression_abc):
87568756
return new_Expression_from_GEx(self._parent,
87578757
g_hold_wrapper(g_sin, self._gobj, hold))
87588758

8759-
def cos(self, hold=False):
8759+
def cos(self, bint hold=False):
87608760
"""
87618761
Return the cosine of ``self``.
87628762
@@ -8817,7 +8817,7 @@ cdef class Expression(Expression_abc):
88178817
return new_Expression_from_GEx(self._parent,
88188818
g_hold_wrapper(g_cos, self._gobj, hold))
88198819

8820-
def tan(self, hold=False):
8820+
def tan(self, bint hold=False):
88218821
"""
88228822
EXAMPLES::
88238823
@@ -8869,7 +8869,7 @@ cdef class Expression(Expression_abc):
88698869
return new_Expression_from_GEx(self._parent,
88708870
g_hold_wrapper(g_tan, self._gobj, hold))
88718871

8872-
def arcsin(self, hold=False):
8872+
def arcsin(self, bint hold=False):
88738873
"""
88748874
Return the arcsin of x, i.e., the number y between -pi and pi
88758875
such that sin(y) == x.
@@ -8922,7 +8922,7 @@ cdef class Expression(Expression_abc):
89228922
return new_Expression_from_GEx(self._parent,
89238923
g_hold_wrapper(g_asin, self._gobj, hold))
89248924

8925-
def arccos(self, hold=False):
8925+
def arccos(self, bint hold=False):
89268926
"""
89278927
Return the arc cosine of ``self``.
89288928
@@ -8972,7 +8972,7 @@ cdef class Expression(Expression_abc):
89728972
return new_Expression_from_GEx(self._parent,
89738973
g_hold_wrapper(g_acos, self._gobj, hold))
89748974

8975-
def arctan(self, hold=False):
8975+
def arctan(self, bint hold=False):
89768976
"""
89778977
Return the arc tangent of ``self``.
89788978
@@ -9021,7 +9021,7 @@ cdef class Expression(Expression_abc):
90219021
return new_Expression_from_GEx(self._parent,
90229022
g_hold_wrapper(g_atan, self._gobj, hold))
90239023

9024-
def arctan2(self, x, hold=False):
9024+
def arctan2(self, x, bint hold=False):
90259025
"""
90269026
Return the inverse of the 2-variable tan function on ``self`` and ``x``.
90279027
@@ -9125,7 +9125,7 @@ cdef class Expression(Expression_abc):
91259125
return new_Expression_from_GEx(self._parent,
91269126
g_hold2_wrapper(g_atan2, self._gobj, nexp._gobj, hold))
91279127

9128-
def sinh(self, hold=False):
9128+
def sinh(self, bint hold=False):
91299129
r"""
91309130
Return sinh of ``self``.
91319131
@@ -9183,7 +9183,7 @@ cdef class Expression(Expression_abc):
91839183
return new_Expression_from_GEx(self._parent,
91849184
g_hold_wrapper(g_sinh, self._gobj, hold))
91859185

9186-
def cosh(self, hold=False):
9186+
def cosh(self, bint hold=False):
91879187
r"""
91889188
Return cosh of ``self``.
91899189
@@ -9239,7 +9239,7 @@ cdef class Expression(Expression_abc):
92399239
return new_Expression_from_GEx(self._parent,
92409240
g_hold_wrapper(g_cosh, self._gobj, hold))
92419241

9242-
def tanh(self, hold=False):
9242+
def tanh(self, bint hold=False):
92439243
r"""
92449244
Return tanh of ``self``.
92459245
@@ -9293,7 +9293,7 @@ cdef class Expression(Expression_abc):
92939293
return new_Expression_from_GEx(self._parent,
92949294
g_hold_wrapper(g_tanh, self._gobj, hold))
92959295

9296-
def arcsinh(self, hold=False):
9296+
def arcsinh(self, bint hold=False):
92979297
"""
92989298
Return the inverse hyperbolic sine of ``self``.
92999299
@@ -9346,7 +9346,7 @@ cdef class Expression(Expression_abc):
93469346
return new_Expression_from_GEx(self._parent,
93479347
g_hold_wrapper(g_asinh, self._gobj, hold))
93489348

9349-
def arccosh(self, hold=False):
9349+
def arccosh(self, bint hold=False):
93509350
"""
93519351
Return the inverse hyperbolic cosine of ``self``.
93529352
@@ -9395,7 +9395,7 @@ cdef class Expression(Expression_abc):
93959395
return new_Expression_from_GEx(self._parent,
93969396
g_hold_wrapper(g_acosh, self._gobj, hold))
93979397

9398-
def arctanh(self, hold=False):
9398+
def arctanh(self, bint hold=False):
93999399
"""
94009400
Return the inverse hyperbolic tangent of ``self``.
94019401
@@ -9452,7 +9452,7 @@ cdef class Expression(Expression_abc):
94529452
return new_Expression_from_GEx(self._parent,
94539453
g_hold_wrapper(g_atanh, self._gobj, hold))
94549454

9455-
def exp(self, hold=False):
9455+
def exp(self, bint hold=False):
94569456
r"""
94579457
Return exponential function of ``self``, i.e., `e` to the
94589458
power of ``self``.
@@ -9508,7 +9508,7 @@ cdef class Expression(Expression_abc):
95089508
return new_Expression_from_GEx(self._parent,
95099509
g_hold_wrapper(g_exp, self._gobj, hold))
95109510

9511-
def log(self, b=None, hold=False):
9511+
def log(self, b=None, bint hold=False):
95129512
"""
95139513
Return the logarithm of ``self``.
95149514
@@ -9571,7 +9571,7 @@ cdef class Expression(Expression_abc):
95719571
else:
95729572
return res/self.coerce_in(b).log(hold=hold)
95739573

9574-
def zeta(self, hold=False):
9574+
def zeta(self, bint hold=False):
95759575
"""
95769576
EXAMPLES::
95779577
@@ -9613,7 +9613,7 @@ cdef class Expression(Expression_abc):
96139613
cdef GEx x = g_hold_wrapper(g_zeta, self._gobj, hold)
96149614
return new_Expression_from_GEx(self._parent, x)
96159615

9616-
def factorial(self, hold=False):
9616+
def factorial(self, bint hold=False):
96179617
"""
96189618
Return the factorial of ``self``.
96199619
@@ -9655,7 +9655,7 @@ cdef class Expression(Expression_abc):
96559655
sig_off()
96569656
return new_Expression_from_GEx(self._parent, x)
96579657

9658-
def binomial(self, k, hold=False):
9658+
def binomial(self, k, bint hold=False):
96599659
"""
96609660
Return binomial coefficient "self choose k".
96619661
@@ -9707,7 +9707,7 @@ cdef class Expression(Expression_abc):
97079707
sig_off()
97089708
return new_Expression_from_GEx(self._parent, x)
97099709

9710-
def Order(self, hold=False):
9710+
def Order(self, bint hold=False):
97119711
"""
97129712
Return the order of the expression, as in big oh notation.
97139713
@@ -9729,7 +9729,7 @@ cdef class Expression(Expression_abc):
97299729
return new_Expression_from_GEx(self._parent,
97309730
g_hold_wrapper(g_Order, self._gobj, hold))
97319731

9732-
def gamma(self, *, hold=False):
9732+
def gamma(self, *, bint hold=False):
97339733
"""
97349734
Return the Gamma function evaluated at ``self``.
97359735
@@ -9794,7 +9794,7 @@ cdef class Expression(Expression_abc):
97949794
sig_off()
97959795
return new_Expression_from_GEx(self._parent, x)
97969796

9797-
def log_gamma(self, hold=False):
9797+
def log_gamma(self, bint hold=False):
97989798
"""
97999799
Return the log gamma function evaluated at ``self``.
98009800
This is the logarithm of gamma of ``self``, where

0 commit comments

Comments
 (0)