Title: Allow borrowing from NewReference by lostmsu · Pull Request #1088 · pythonnet/pythonnet · GitHub
Open Graph Title: Allow borrowing from NewReference by lostmsu · Pull Request #1088 · pythonnet/pythonnet
X Title: Allow borrowing from NewReference by lostmsu · Pull Request #1088 · pythonnet/pythonnet
Description: implemented as an implicit conversion To be honest, I would prefer an explicit NewReference.Borrow() method due to "explicit is better than implicit" motto. The only problem with implicit conversion that I see is new PyObject(newRef) will call an extra incref implicitly as opposed to newRef.MoveToPyObject(), and will go unnoticed. Another thing to consider is having a null-check in the conversion. E.g. should we throw NullReferenceException if NewReference is null? Does this close any currently open issues? Related to #1087 Checklist Check all those that are applicable and complete. Make sure to include one or more tests for your change If an enhancement PR, please create docs and at best an example
Open Graph Description: implemented as an implicit conversion To be honest, I would prefer an explicit NewReference.Borrow() method due to "explicit is better than implicit" motto. The only problem with implicit...
X Description: implemented as an implicit conversion To be honest, I would prefer an explicit NewReference.Borrow() method due to "explicit is better than implicit" motto. The only problem with ...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1088
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:30c7e8bf-093b-42a6-18b0-a38330495b03 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A902:4C064:C6E703:115AAC5:69725904 |
| html-safe-nonce | 3b864c4c1ac437a13d0329db95ce44437699c0154909561422317f813c50f81a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTAyOjRDMDY0OkM2RTcwMzoxMTVBQUM1OjY5NzI1OTA0IiwidmlzaXRvcl9pZCI6IjM3Nzg0OTY0NjI1MTc4NTI0MjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d6eeff1db50a7be597356c8825c30d7a0e1de0e9454bb70eb7688087fc06ef0b |
| hovercard-subject-tag | pull_request:386508475 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/pythonnet/pythonnet/pull/1088/checks |
| twitter:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| og:image:alt | implemented as an implicit conversion To be honest, I would prefer an explicit NewReference.Borrow() method due to "explicit is better than implicit" motto. The only problem with implicit... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f5a890431069e39e7eb98c8c81da83629b10b51afe674db42bf829dbc0abba43 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26c781f26acd529068611189d77d95c57099561a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width