FloatAsDouble => Float64
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user