Title: `IComparable` and `IEquatable` implementations by lostmsu · Pull Request #2322 · pythonnet/pythonnet · GitHub
Open Graph Title: `IComparable` and `IEquatable` implementations by lostmsu · Pull Request #2322 · pythonnet/pythonnet
X Title: `IComparable` and `IEquatable` implementations by lostmsu · Pull Request #2322 · pythonnet/pythonnet
Description: IComparable and IEquatable implementations for PyInt, PyFloat, and PyString for primitive .NET types What does this implement/fix? Explain your changes. Let's one do PyInt.CompareTo(42) and similar things Does this close any currently open issues? N/A Any other comments? Should we take GIL in these methods? Might be useful for Array.Sort when called from Python. On a more general topic: should we have a way for Python to call a .NET method and have it not release the GIL for compatibility with 3rd party (to Python.NET) libraries that assume they can call back any methods they wish at any time. Because having explicit GIL acquisition in CompareTo to use with Array.Sort would kill performance. E.g. something like: with clr.HoldGIL(): Array.Sort(dotnet_array_of_python_objects) 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 Add yourself to AUTHORS Updated the CHANGELOG
Open Graph Description: IComparable and IEquatable implementations for PyInt, PyFloat, and PyString for primitive .NET types What does this implement/fix? Explain your changes. Let's one do PyInt.CompareTo(42) and sim...
X Description: IComparable and IEquatable implementations for PyInt, PyFloat, and PyString for primitive .NET types What does this implement/fix? Explain your changes. Let's one do PyInt.CompareTo(42) and...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/2322
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:8e55fe0e-a228-42a3-f460-ff32ff9e147d |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | ACCC:184028:319183A:32366D4:69702E4E |
| html-safe-nonce | 3637485777b79dd3daa5184e62b8d3e2d03b0f758715486fe9aed965beaba2a9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0NDOjE4NDAyODozMTkxODNBOjMyMzY2RDQ6Njk3MDJFNEUiLCJ2aXNpdG9yX2lkIjoiMTExMzY2MjA5OTM4MTMwMDgxNCIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | cb63b476a4dcaad3f83eff9ffc2e27f30898d09b920e3f4e083603d2f8a7465e |
| hovercard-subject-tag | pull_request:1728515850 |
| 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/2322/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 | IComparable and IEquatable implementations for PyInt, PyFloat, and PyString for primitive .NET types What does this implement/fix? Explain your changes. Let's one do PyInt.CompareTo(42) and sim... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01fa379f5de85ef8e791d09724e69709ce9eb9595278316e0a921312dc88e0bc |
| 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 | dda91974c069382b0dfa47b2da7e28bd061c8331 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width