Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion py/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (o Int) Type() *Type {
func IntNew(metatype *Type, args Tuple, kwargs StringDict) (Object, error) {
var xObj Object = Int(0)
var baseObj Object
base := 0
base := 10
err := ParseTupleAndKeywords(args, kwargs, "|OO:int", []string{"x", "base"}, &xObj, &baseObj)
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions py/tests/int.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@

doc="sigils"
assert int("7") == 7
assert int("07") == 7
assert int("07", 10) == 7

assert int("F", 16) == 15
Expand Down