Skip to content

py: int() default to decimal #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2023
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy