Title: Float documentation doesn't allow int-like strings as valid arguments for float · Issue #100428 · python/cpython · GitHub
Open Graph Title: Float documentation doesn't allow int-like strings as valid arguments for float · Issue #100428 · python/cpython
X Title: Float documentation doesn't allow int-like strings as valid arguments for float · Issue #100428 · python/cpython
Description: The documentation for float doesn't explicitly allow int-like strings, although it does give one as an example. E.g. although float('10') works and returns a float, the documentation implies that it shouldn't. See discussion on Discuss. ...
Open Graph Description: The documentation for float doesn't explicitly allow int-like strings, although it does give one as an example. E.g. although float('10') works and returns a float, the documentation implies that i...
X Description: The documentation for float doesn't explicitly allow int-like strings, although it does give one as an example. E.g. although float('10') works and returns a float, the documentation im...
Opengraph URL: https://github.com/python/cpython/issues/100428
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Float documentation doesn't allow int-like strings as valid arguments for float","articleBody":"[The documentation for `float`](https://docs.python.org/3/library/functions.html#float) doesn't explicitly allow int-like strings, although it does give one as an example. E.g. although `float('10')` works and returns a float, the documentation implies that it shouldn't.\r\n\r\nSee [discussion on Discuss](https://discuss.python.org/t/is-it-legal-valid-to-use-float-to-convert-a-string-containing-integer-to-float/22114).\r\n\r\n\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-100436\n* gh-100437\n* gh-100510\n* gh-100511\n* gh-100674\n* gh-100675\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/stevendaprano","@type":"Person","name":"stevendaprano"},"datePublished":"2022-12-22T10:00:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/100428/cpython/issues/100428"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:73515f47-337e-1f5e-3131-2372cb82bd24 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1D2:2A2892:2677FA3:36306AF:69691B29 |
| html-safe-nonce | 48daf85e6ac75f57382590b75b900375a2977df27647b65dba7cc765f1494cdc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUQyOjJBMjg5MjoyNjc3RkEzOjM2MzA2QUY6Njk2OTFCMjkiLCJ2aXNpdG9yX2lkIjoiMjI0NTk3Mjk0OTI4NzM3NzcwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a7da139218d12a13002b95d559be46e9e48a0d4cb0524e1528591117fcad7b8a |
| hovercard-subject-tag | issue:1507578505 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/100428/issue_layout |
| twitter:image | https://opengraph.githubassets.com/70d77e85dc52563c87b2ccca7008709aae519d497eb96f6dbc52f633ab9b3eea/python/cpython/issues/100428 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/70d77e85dc52563c87b2ccca7008709aae519d497eb96f6dbc52f633ab9b3eea/python/cpython/issues/100428 |
| og:image:alt | The documentation for float doesn't explicitly allow int-like strings, although it does give one as an example. E.g. although float('10') works and returns a float, the documentation implies that i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stevendaprano |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e60568924309a021b51adabdce15c2a2f285b556f3130d1a2fa2a5bce11c55f |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd206f7ed6207863172be4a783826e86bd2375c3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width