Title: int() and math.trunc don't accept objects that only define __index__ · Issue #77220 · python/cpython · GitHub
Open Graph Title: int() and math.trunc don't accept objects that only define __index__ · Issue #77220 · python/cpython
X Title: int() and math.trunc don't accept objects that only define __index__ · Issue #77220 · python/cpython
Description: BPO 33039 Nosy @mdickinson, @ncoghlan, @serhiy-storchaka, @appeltel, @csabella, @remilapeyre, @tirkarthi PRs #13106 Superseder bpo-20092: type() constructor should bind int to index when index is defined and int is not Note: these values...
Open Graph Description: BPO 33039 Nosy @mdickinson, @ncoghlan, @serhiy-storchaka, @appeltel, @csabella, @remilapeyre, @tirkarthi PRs #13106 Superseder bpo-20092: type() constructor should bind int to index when index is d...
X Description: BPO 33039 Nosy @mdickinson, @ncoghlan, @serhiy-storchaka, @appeltel, @csabella, @remilapeyre, @tirkarthi PRs #13106 Superseder bpo-20092: type() constructor should bind int to index when index is d...
Opengraph URL: https://github.com/python/cpython/issues/77220
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"int() and math.trunc don't accept objects that only define __index__","articleBody":"BPO | [33039](https://bugs.python.org/issue33039)\n--- | :---\nNosy | @mdickinson, @ncoghlan, @serhiy-storchaka, @appeltel, @csabella, @remilapeyre, @tirkarthi\nPRs | \u003cli\u003epython/cpython#13106\u003c/li\u003e\nSuperseder | \u003cli\u003ebpo-20092: type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not\u003c/li\u003e\n\n\u003csup\u003e*Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.*\u003c/sup\u003e\n\n\u003cdetails\u003e\u003csummary\u003eShow more details\u003c/summary\u003e\u003cp\u003e\n\nGitHub fields:\n```python\nassignee = None\nclosed_at = \u003cDate 2019-05-06.14:29:29.151\u003e\ncreated_at = \u003cDate 2018-03-10.08:57:10.957\u003e\nlabels = ['3.8', 'type-feature', '3.7', 'docs']\ntitle = \"int() and math.trunc don't accept objects that only define __index__\"\nupdated_at = \u003cDate 2019-05-06.14:29:29.150\u003e\nuser = 'https://github.com/ncoghlan'\n```\n\nbugs.python.org fields:\n```python\nactivity = \u003cDate 2019-05-06.14:29:29.150\u003e\nactor = 'serhiy.storchaka'\nassignee = 'docs@python'\nclosed = True\nclosed_date = \u003cDate 2019-05-06.14:29:29.151\u003e\ncloser = 'serhiy.storchaka'\ncomponents = ['Documentation']\ncreation = \u003cDate 2018-03-10.08:57:10.957\u003e\ncreator = 'ncoghlan'\ndependencies = []\nfiles = []\nhgrepos = []\nissue_num = 33039\nkeywords = ['patch']\nmessage_count = 10.0\nmessages = ['313515', '313522', '332819', '333546', '336044', '336201', '336234', '340453', '341505', '341508']\nnosy_count = 8.0\nnosy_names = ['mark.dickinson', 'ncoghlan', 'docs@python', 'serhiy.storchaka', 'Eric Appelt', 'cheryl.sabella', 'remi.lapeyre', 'xtreak']\npr_nums = ['13106']\npriority = 'normal'\nresolution = 'duplicate'\nstage = 'resolved'\nstatus = 'closed'\nsuperseder = '20092'\ntype = 'enhancement'\nurl = 'https://bugs.python.org/issue33039'\nversions = ['Python 3.6', 'Python 3.7', 'Python 3.8']\n```\n\n\u003c/p\u003e\u003c/details\u003e\n","author":{"url":"https://github.com/ncoghlan","@type":"Person","name":"ncoghlan"},"datePublished":"2018-03-10T08:57:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/77220/cpython/issues/77220"}
| 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:31e9a6dc-8539-8be8-ce46-5879293fdab8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B644:6697C:9F0595:E92BD5:6A4E1E47 |
| html-safe-nonce | ac85bb064016389e35968c31f872284a6ab67caddb771af8939e680f52aedc3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjQ0OjY2OTdDOjlGMDU5NTpFOTJCRDU6NkE0RTFFNDciLCJ2aXNpdG9yX2lkIjoiODI4MDk1Nzg4MDYxOTYzODM0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e9ce1f81e3c65ac99a616623ea66852f12ad8f9a5b55ec8cfbf1007f4993b1b9 |
| hovercard-subject-tag | issue:1198988731 |
| 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/77220/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3af803d465edd98eea2ba2957209a529afeb1703c40f2600952591d32110a54d/python/cpython/issues/77220 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3af803d465edd98eea2ba2957209a529afeb1703c40f2600952591d32110a54d/python/cpython/issues/77220 |
| og:image:alt | BPO 33039 Nosy @mdickinson, @ncoghlan, @serhiy-storchaka, @appeltel, @csabella, @remilapeyre, @tirkarthi PRs #13106 Superseder bpo-20092: type() constructor should bind int to index when index is d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ncoghlan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| 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 | 5fe497b4815fcce3df76c0e246faa739a82c3124 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width