You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: py/complex.go
+20-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ import (
7
7
"math/cmplx"
8
8
)
9
9
10
-
varComplexType=NewType("complex64", "complex(real[, imag]) -> complex number\n\nCreate a complex number from a real part and an optional imaginary part.\nThis is equivalent to (real + imag*1j) where imag defaults to 0.")
10
+
varComplexType=ObjectType.NewType("complex64", "complex(real[, imag]) -> complex number\n\nCreate a complex number from a real part and an optional imaginary part.\nThis is equivalent to (real + imag*1j) where imag defaults to 0.", ComplexNew, nil)
11
11
12
12
typeComplexcomplex128
13
13
@@ -16,6 +16,25 @@ func (o Complex) Type() *Type {
Copy file name to clipboardExpand all lines: py/float.go
+34-6
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,16 @@ package py
5
5
import (
6
6
"math"
7
7
"math/big"
8
+
"strconv"
8
9
)
9
10
10
-
varFloatType=NewType("float", "float(x) -> floating point number\n\nConvert a string or number to a floating point number, if possible.")
11
+
varFloatType=ObjectType.NewType("float", "float(x) -> floating point number\n\nConvert a string or number to a floating point number, if possible.", FloatNew, nil)
0 commit comments