Title: Inheriting and extending Python classes in C# · Issue #862 · pythonnet/pythonnet · GitHub
Open Graph Title: Inheriting and extending Python classes in C# · Issue #862 · pythonnet/pythonnet
X Title: Inheriting and extending Python classes in C# · Issue #862 · pythonnet/pythonnet
Description: Environment Pythonnet version: 2.4.0 Python version: 3.6 Operating System: Win10 x64 Details I am trying to let a user of my library inherit a Python class, and override some of its behavior. Simply declaring a class with the same set of...
Open Graph Description: Environment Pythonnet version: 2.4.0 Python version: 3.6 Operating System: Win10 x64 Details I am trying to let a user of my library inherit a Python class, and override some of its behavior. Simpl...
X Description: Environment Pythonnet version: 2.4.0 Python version: 3.6 Operating System: Win10 x64 Details I am trying to let a user of my library inherit a Python class, and override some of its behavior. Simpl...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/862
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inheriting and extending Python classes in C#","articleBody":"### Environment\r\n\r\n- Pythonnet version: 2.4.0\r\n- Python version: 3.6\r\n- Operating System: Win10 x64\r\n\r\n### Details\r\n\r\nI am trying to let a user of my library inherit a Python class, and override some of its behavior. Simply declaring a class with the same set of methods, and calling `ToPython` on it somewhat works thanks to Python's duck typing.\r\n\r\nProblem is that approach fails to pass `isinstance` and `obj is Class` tests in the 3rd-party Python code.\r\n\r\nIf there's no existing way to deal with it, I'd be happy to implement the necessary machinery, if somebody would give some directions on where to start.","author":{"url":"https://github.com/lostmsu","@type":"Person","name":"lostmsu"},"datePublished":"2019-05-15T00:01:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/862/pythonnet/issues/862"}
| 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:0ccfd164-06e9-c2d5-c8e5-e2c2070ea981 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C432:18F725:2C51096:3CE696B:6972B1AB |
| html-safe-nonce | b2ce16d8d4b9b86124eb204ebc1f5b619026e60afbc822664c01650d90f4c040 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDMyOjE4RjcyNToyQzUxMDk2OjNDRTY5NkI6Njk3MkIxQUIiLCJ2aXNpdG9yX2lkIjoiMzgxOTg3MTg5NjgxOTkwNDkzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7debd1a3cf19782e34b54f5893d490c2bd49e8b176c53099b6c53ce1e399bce9 |
| hovercard-subject-tag | issue:444177477 |
| 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/pythonnet/pythonnet/862/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c0032718ddd5a8da4abd8fbcb9075e38d03e12a4012bbb33b94e008d6f0d566/pythonnet/pythonnet/issues/862 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c0032718ddd5a8da4abd8fbcb9075e38d03e12a4012bbb33b94e008d6f0d566/pythonnet/pythonnet/issues/862 |
| og:image:alt | Environment Pythonnet version: 2.4.0 Python version: 3.6 Operating System: Win10 x64 Details I am trying to let a user of my library inherit a Python class, and override some of its behavior. Simpl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lostmsu |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae357919e9cc5fb635a01c9a2cc530478d3ac85f55090215eb70e1beca3385ac |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| 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 | 625f1bd9f76a617a9c0729e2de91edb56b6ce42f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width