MCPcopy Index your code
hub / github.com/RustPython/RustPython / to_sci_string

Method to_sci_string

Lib/_pydecimal.py:5522–5528  ·  view source on GitHub ↗

Converts a number to a string, using scientific notation. The operation is not affected by the context.

(self, a)

Source from the content-addressed store, hash-verified

5520 return a.to_eng_string(context=self)
5521
5522 def to_sci_string(self, a):
5523 """Converts a number to a string, using scientific notation.
5524
5525 The operation is not affected by the context.
5526 """
5527 a = _convert_other(a, raiseit=True)
5528 return a.__str__(context=self)
5529
5530 def to_integral_exact(self, a):
5531 """Rounds to an integer.

Callers 2

test_to_sci_stringMethod · 0.95

Calls 2

_convert_otherFunction · 0.85
__str__Method · 0.45

Tested by 2

test_to_sci_stringMethod · 0.76