Skip to content
Permalink
bcafcf8fc3
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
15 lines (10 sloc) 247 Bytes
# test that math functions support user classes with __float__
try:
import math
except ImportError:
print("SKIP")
raise SystemExit
class TestFloat:
def __float__(self):
return 1.0
print("%.5g" % math.exp(TestFloat()))