Skip to content

Commit cd30f43

Browse files
authored
Merge pull request #1396 from mathics/note-internal-builtin-classes
Make internal Builtins internal.
2 parents 871d77c + 58cb4a0 commit cd30f43

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

mathics/builtin/numbers/constants.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def get_constant(self, precision, evaluation, preference=None):
139139
return
140140

141141

142-
class MPMathConstant(_Constant_Common):
142+
class _MPMathConstant(_Constant_Common):
143143
"""Representation of a constant in mpmath, e.g. Pi, E, I, etc."""
144144

145145
# Subclasses should define this.
@@ -159,7 +159,7 @@ def to_mpmath(self, args):
159159
return getattr(mpmath, self.mpmath_name)
160160

161161

162-
class NumpyConstant(_Constant_Common):
162+
class _NumpyConstant(_Constant_Common):
163163
"""Representation of a constant in numpy, e.g. Pi, E, etc."""
164164

165165
# Subclasses should define this.
@@ -179,7 +179,7 @@ def to_numpy(self, args):
179179
return self.get_constant()
180180

181181

182-
class SympyConstant(_Constant_Common, SympyObject):
182+
class _SympyConstant(_Constant_Common, SympyObject):
183183
"""Representation of a constant in Sympy, e.g. Pi, E, I, Catalan, etc."""
184184

185185
# Subclasses should define this.
@@ -196,7 +196,7 @@ def to_sympy(self, expr=None, **kwargs):
196196
return None
197197

198198

199-
class Catalan(MPMathConstant, SympyConstant):
199+
class Catalan(_MPMathConstant, _SympyConstant):
200200
"""
201201
<dl>
202202
<dt>'Catalan'
@@ -215,7 +215,7 @@ class Catalan(MPMathConstant, SympyConstant):
215215
sympy_name = "Catalan"
216216

217217

218-
class ComplexInfinity(SympyConstant):
218+
class ComplexInfinity(_SympyConstant):
219219
"""
220220
<dl>
221221
<dt>'ComplexInfinity'
@@ -245,7 +245,7 @@ class ComplexInfinity(SympyConstant):
245245
}
246246

247247

248-
class Degree(MPMathConstant, NumpyConstant, SympyConstant):
248+
class Degree(_MPMathConstant, _NumpyConstant, _SympyConstant):
249249
"""
250250
<dl>
251251
<dt>'Degree'
@@ -305,7 +305,7 @@ def apply_N(self, precision, evaluation, options={}):
305305
return PrecisionReal((sympy.pi / 180).n(d))
306306

307307

308-
class E(MPMathConstant, NumpyConstant, SympyConstant):
308+
class E(_MPMathConstant, _NumpyConstant, _SympyConstant):
309309
"""
310310
<dl>
311311
<dt>'E'</dt>
@@ -330,7 +330,7 @@ def apply_N(self, precision, evaluation, options={}):
330330
return self.get_constant(precision, evaluation)
331331

332332

333-
class EulerGamma(MPMathConstant, NumpyConstant, SympyConstant):
333+
class EulerGamma(_MPMathConstant, _NumpyConstant, _SympyConstant):
334334
"""
335335
<dl>
336336
<dt>'EulerGamma'</dt>
@@ -349,7 +349,7 @@ class EulerGamma(MPMathConstant, NumpyConstant, SympyConstant):
349349
sympy_name = "EulerGamma"
350350

351351

352-
class Glaisher(MPMathConstant):
352+
class Glaisher(_MPMathConstant):
353353
"""
354354
<dl>
355355
<dt>'Glaisher'</dt>
@@ -366,7 +366,7 @@ class Glaisher(MPMathConstant):
366366
mpmath_name = "glaisher"
367367

368368

369-
class GoldenRatio(MPMathConstant, SympyConstant):
369+
class GoldenRatio(_MPMathConstant, _SympyConstant):
370370
"""
371371
<dl>
372372
<dt>'GoldenRatio'
@@ -383,7 +383,7 @@ class GoldenRatio(MPMathConstant, SympyConstant):
383383
mpmath_name = "phi"
384384

385385

386-
class Indeterminate(SympyConstant):
386+
class Indeterminate(_SympyConstant):
387387
"""
388388
<dl>
389389
<dt>'Indeterminate'</dt>
@@ -401,7 +401,7 @@ class Indeterminate(SympyConstant):
401401
sympy_name = "nan"
402402

403403

404-
class Infinity(SympyConstant):
404+
class Infinity(_SympyConstant):
405405
"""
406406
<dl>
407407
<dt>'Infinity'
@@ -439,7 +439,7 @@ class Infinity(SympyConstant):
439439
}
440440

441441

442-
class Khinchin(MPMathConstant):
442+
class Khinchin(_MPMathConstant):
443443
"""
444444
<dl>
445445
<dt>'Khinchin'</dt>
@@ -456,8 +456,8 @@ class Khinchin(MPMathConstant):
456456
mpmath_name = "khinchin"
457457

458458

459-
class Pi(MPMathConstant, SympyConstant):
460-
"""
459+
class Pi(_MPMathConstant, _SympyConstant):
460+
u"""
461461
<dl>
462462
<dt>'Pi'</dt>
463463
<dd>is the constant \u03c0.

0 commit comments

Comments
 (0)