[Expression] inconsistency between doc and implementation for 'int', 'float'
See original GitHub issueGithub issues should be used for bugs and feature requests. Use Stack Overflow for general “how-to” questions.
Version
What package version of the SDK are you using.
Current main
Describe the bug
Give a clear and concise description of what the bug is.
The document says ‘Return the floating point representation of the specified string or the string itself if conversion isn’t possible.’
However, if one uses int('bad')
, float('bad')
, it will throw an exception ‘Input string was not in a correct format.’
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Give a clear and concise description of what you expected to happen.
If exception is the planned behavior, we still need a function to know if a string is whether in int format (from document, we could int
and then isInteger
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
int is not a Number? · Issue #3186 · python/mypy
I've been trying to cobble together a library that interoperates between a number of domains (e.g. floats, Fraction, Decimal, numpy, gmp, sympy, ...
Read more >What Every Computer Scientist Should Know About ...
Almost every language has a floating-point datatype; computers from PCs to supercomputers have floating-point accelerators; most compilers will be called upon ...
Read more >What are the implications of constexpr floating-point math?
This can lead to possible inconsistencies in the results, both between compilers, and between runtime/compile-time evaluation by the same ...
Read more >FLP07-C. Cast the return value of a function ...
If a return statement with an expression is executed, the value of the expression is returned to the caller as the value of...
Read more >A Tutorial on Data Representation - Integers, Floating-point ...
It is important to take note that integers and floating-point numbers are treated differently in computers. They have different representation and are ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@emgrol Sure, hope the new functions could be added soon.
close this one due to the duplication of #4773