Title: Constructor executed twice when overriding constructor in System.Object. · Issue #495 · pythonnet/pythonnet · GitHub
Open Graph Title: Constructor executed twice when overriding constructor in System.Object. · Issue #495 · pythonnet/pythonnet
X Title: Constructor executed twice when overriding constructor in System.Object. · Issue #495 · pythonnet/pythonnet
Description: Environment Pythonnet version: 2.3.0 Python version: 2.7.13 Operating System: Windows 10 Details We are trying to create a subclass of System.Object (using namespace) and override the constructor. For some reason, the conctructor is exec...
Open Graph Description: Environment Pythonnet version: 2.3.0 Python version: 2.7.13 Operating System: Windows 10 Details We are trying to create a subclass of System.Object (using namespace) and override the constructor. ...
X Description: Environment Pythonnet version: 2.3.0 Python version: 2.7.13 Operating System: Windows 10 Details We are trying to create a subclass of System.Object (using namespace) and override the constructor. ...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/495
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Constructor executed twice when overriding constructor in System.Object.","articleBody":"### Environment\r\n\r\n- Pythonnet version: 2.3.0\r\n- Python version: 2.7.13\r\n- Operating System: Windows 10\r\n\r\n### Details\r\n\r\nWe are trying to create a subclass of System.Object (using namespace) and override the constructor.\r\n\r\nFor some reason, the conctructor is executed twice when an instance of the class is created. Below is an example that reproduces the problem.\r\n\r\n```python\r\nclass X(System.Object):\r\n __namespace__ = \"PyTest\"\r\n\r\n def __init__(self):\r\n print(\"Running X constructor\")\r\n\r\nx = X()\r\n```\r\nThe output is\r\n\r\n```\r\nRunning X constructor\r\nRunning X constructor\r\n```\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/klasma","@type":"Person","name":"klasma"},"datePublished":"2017-06-15T09:34:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/495/pythonnet/issues/495"}
| 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:246c7bbb-f97e-1494-1beb-1044eb663d4e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD0E:DF47A:3240AC6:4120543:6974A4AA |
| html-safe-nonce | b7aeaa064af3e4c9452d13d53ca2a2bde44d8a05f56a29a9ad62cd12122191ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDBFOkRGNDdBOjMyNDBBQzY6NDEyMDU0Mzo2OTc0QTRBQSIsInZpc2l0b3JfaWQiOiIyOTA3MDQxNTk4MDkwMjkwMzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5e161afc3c281c1cd30f7cb037d8c0e35369d061936ea9ca8c6520f78014ce96 |
| hovercard-subject-tag | issue:236131356 |
| 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/495/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad8e334bd04281356595dcb4aff5a2c44ab1a3fbf5612c097913ea30191c2e19/pythonnet/pythonnet/issues/495 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad8e334bd04281356595dcb4aff5a2c44ab1a3fbf5612c097913ea30191c2e19/pythonnet/pythonnet/issues/495 |
| og:image:alt | Environment Pythonnet version: 2.3.0 Python version: 2.7.13 Operating System: Windows 10 Details We are trying to create a subclass of System.Object (using namespace) and override the constructor. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | klasma |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width