Skip to content
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

Explicit Typecast Of Strings Quibble #13

Closed
beriukay opened this issue Aug 31, 2017 · 1 comment
Closed

Explicit Typecast Of Strings Quibble #13

beriukay opened this issue Aug 31, 2017 · 1 comment
Assignees

Comments

@beriukay
Copy link

In my python 2.7 interpreter I get a different output:

50/a #Example version
0
50/a #My version
0.0

Not sure if that's a version thing, a typo, or something else.

@satwikkansal
Copy link
Owner

satwikkansal commented Aug 31, 2017

Ah, that's a typo. float('inf') is a float and the result of 50/float('inf') should also be float.

@satwikkansal satwikkansal self-assigned this Aug 31, 2017
BenSt099 added a commit to BenSt099/wtfpython that referenced this issue Aug 11, 2023
tothetop430 added a commit to tothetop430/wtfpython that referenced this issue Dec 9, 2023
Changes 0 to 0.0 in the output of explicit
string typecasting example.

Fixes satwikkansal/wtfpython#13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants