In [1]:
import pint as pn
import inspect
In [2]:
print(inspect.getsource(pn.floattools.stringtofraction))
In [3]:
a = pn.floattools.stringtofraction("0.1")
In [4]:
print(a)