FloatAsDouble => Float64

This commit is contained in:
xushiwei
2024-05-11 06:55:57 +08:00
parent 1414853fce
commit 2560a333b6
3 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ func main() {
math := py.ImportModule(c.Str("math"))
sqrt := math.GetAttrString(c.Str("sqrt"))
sqrt2 := sqrt.CallOneArg(py.Float(2))
c.Printf(c.Str("sqrt(2) = %f\n"), sqrt2.FloatAsDouble())
c.Printf(c.Str("sqrt(2) = %f\n"), sqrt2.Float64())
sqrt2.DecRef()
sqrt.DecRef()
math.DecRef()