Title: Extract "Unsupported operand types" exception to separate method · Issue #199 · RustPython/RustPython · GitHub
Open Graph Title: Extract "Unsupported operand types" exception to separate method · Issue #199 · RustPython/RustPython
X Title: Extract "Unsupported operand types" exception to separate method · Issue #199 · RustPython/RustPython
Description: Returning exception in call_or_unsupported should be extracted to a separate method. Also, use it to replace incorrect exceptions in objfloat.rs (and others). This should fix wrong exceptions, such as >>>>> 1.1 - "a" Traceback (most rece...
Open Graph Description: Returning exception in call_or_unsupported should be extracted to a separate method. Also, use it to replace incorrect exceptions in objfloat.rs (and others). This should fix wrong exceptions, such...
X Description: Returning exception in call_or_unsupported should be extracted to a separate method. Also, use it to replace incorrect exceptions in objfloat.rs (and others). This should fix wrong exceptions, such...
Opengraph URL: https://github.com/RustPython/RustPython/issues/199
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extract \"Unsupported operand types\" exception to separate method","articleBody":"[Returning exception](https://github.com/RustPython/RustPython/blob/master/vm/src/vm.rs#L517) in `call_or_unsupported` should be extracted to a separate method.\r\nAlso, use it to replace incorrect exceptions in objfloat.rs (and others).\r\n\r\nThis should fix wrong exceptions, such as\r\n```\r\n\u003e\u003e\u003e\u003e\u003e 1.1 - \"a\"\r\nTraceback (most recent call last):\r\n File \u003cunknown\u003e, line 0, in \u003cmodule\u003e\r\nTypeError: Cannot add RefCell { value: [PyObj float 1.1] } and RefCell { value: [PyObj str \"a\"] }\r\n```\r\nshould be\r\n```\r\n\u003e\u003e\u003e 1.1 - \"a\"\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\nTypeError: unsupported operand type(s) for -: 'float' and 'str'\r\n```","author":{"url":"https://github.com/BojanKogoj","@type":"Person","name":"BojanKogoj"},"datePublished":"2018-11-17T10:33:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/199/RustPython/issues/199"}
| 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:e791d0c6-f681-eec3-c5dc-ab643124a428 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECEC:5D9CC:1259E13:18D39A1:6A594D36 |
| html-safe-nonce | 8718f94d6c4da30523cfd667f4026bafbb51742e08a7a5290e2e9e64c0f59833 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0VDOjVEOUNDOjEyNTlFMTM6MThEMzlBMTo2QTU5NEQzNiIsInZpc2l0b3JfaWQiOiIzNTkyMDU1NzUwNDM5NTU0MzU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7c8b31da9ff2523f5a25b901fda2bfaaf8cd20087ba742d0e9f36f8a96a62bef |
| hovercard-subject-tag | issue:381850493 |
| 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/RustPython/RustPython/199/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e9830b19a45e6013794e277a78787298e318cc921a675452483927b725d5c771/RustPython/RustPython/issues/199 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e9830b19a45e6013794e277a78787298e318cc921a675452483927b725d5c771/RustPython/RustPython/issues/199 |
| og:image:alt | Returning exception in call_or_unsupported should be extracted to a separate method. Also, use it to replace incorrect exceptions in objfloat.rs (and others). This should fix wrong exceptions, such... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BojanKogoj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f801e05b35c85b2d72eae6534d2b1d4c02ba8732fd046450bab31e2f52450ce |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 49918fc503387d6d65b6bc6ce6f711c14d17bfbd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width