René's URL Explorer Experiment


Title: Constructor argument matching supports simple int to (float|double) types by sigbjorn · Pull Request #239 · pythonnet/pythonnet · GitHub

Open Graph Title: Constructor argument matching supports simple int to (float|double) types by sigbjorn · Pull Request #239 · pythonnet/pythonnet

X Title: Constructor argument matching supports simple int to (float|double) types by sigbjorn · Pull Request #239 · pythonnet/pythonnet

Description: Refer to Issue #238 This PR aim to improve constructor argument matching so that if you have a .NET constructor accepting a double, it will be selected if you pass it an int. This corresponds to solution part (a.) in the referenced issue. The PR involves tests, that with the prior version would fail, but with the fixes, works Ok. All existing tests, run on python 3.5, x64, windows platform executes Ok. I have not verified other platforms(mono, 32 bits etc), but could do that on request. The PR does currently not support raising Type exception in case a falling back to a default constructor due to arguments not matching. However, if anyone contribute with hint's how to get information about the .NET creation object context (super-class, or just plain class), - I would be happy to extend the contents and tests to cover that important aspect as well.

Open Graph Description: Refer to Issue #238 This PR aim to improve constructor argument matching so that if you have a .NET constructor accepting a double, it will be selected if you pass it an int. This corresponds to ...

X Description: Refer to Issue #238 This PR aim to improve constructor argument matching so that if you have a .NET constructor accepting a double, it will be selected if you pass it an int. This corresponds to ...

Opengraph URL: https://github.com/pythonnet/pythonnet/pull/239

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:865e49fe-93fd-afaf-d902-91b33a48e35b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8268:1A7EA7:3943B8:4DA80B:69719420
html-safe-nonce4e795d477fca9eb6f86ae5da1a7a37c99a4d4303a58d663cbcfde5278880eb57
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjY4OjFBN0VBNzozOTQzQjg6NERBODBCOjY5NzE5NDIwIiwidmlzaXRvcl9pZCI6IjEyNDQyMjg3MjI5Mjc3MDMwNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd8a03e9c2e6094b52d24d7fceb90e70fbfdfe6b11b4c69bd0bed70705b8985bd
hovercard-subject-tagpull_request:76100159
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/pythonnet/pythonnet/pull/239/files
twitter:imagehttps://avatars.githubusercontent.com/u/8044775?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/8044775?s=400&v=4
og:image:altRefer to Issue #238 This PR aim to improve constructor argument matching so that if you have a .NET constructor accepting a double, it will be selected if you pass it an int. This corresponds to ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonefdfdce9cd4f6ab85dca2b0d11264270829297c962dd5a79df449062d7822258f
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git
octolytics-dimension-user_id6050430
octolytics-dimension-user_loginpythonnet
octolytics-dimension-repository_id14748123
octolytics-dimension-repository_nwopythonnet/pythonnet
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14748123
octolytics-dimension-repository_network_root_nwopythonnet/pythonnet
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release51c736e60b302bd039c9d5164573d176ceb24bb2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/pythonnet/pythonnet/pull/239/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fpull%2F239%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fpull%2F239%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=pythonnet%2Fpythonnet
Reloadhttps://github.com/pythonnet/pythonnet/pull/239/files
Reloadhttps://github.com/pythonnet/pythonnet/pull/239/files
Reloadhttps://github.com/pythonnet/pythonnet/pull/239/files
pythonnet https://github.com/pythonnet
pythonnethttps://github.com/pythonnet/pythonnet
Notifications https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Fork 770 https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Star 5.4k https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Code https://github.com/pythonnet/pythonnet
Issues 156 https://github.com/pythonnet/pythonnet/issues
Pull requests 18 https://github.com/pythonnet/pythonnet/pulls
Discussions https://github.com/pythonnet/pythonnet/discussions
Actions https://github.com/pythonnet/pythonnet/actions
Projects 0 https://github.com/pythonnet/pythonnet/projects
Wiki https://github.com/pythonnet/pythonnet/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/pythonnet/pythonnet/security
Please reload this pagehttps://github.com/pythonnet/pythonnet/pull/239/files
Insights https://github.com/pythonnet/pythonnet/pulse
Code https://github.com/pythonnet/pythonnet
Issues https://github.com/pythonnet/pythonnet/issues
Pull requests https://github.com/pythonnet/pythonnet/pulls
Discussions https://github.com/pythonnet/pythonnet/discussions
Actions https://github.com/pythonnet/pythonnet/actions
Projects https://github.com/pythonnet/pythonnet/projects
Wiki https://github.com/pythonnet/pythonnet/wiki
Security https://github.com/pythonnet/pythonnet/security
Insights https://github.com/pythonnet/pythonnet/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpythonnet%2Fpythonnet%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpythonnet%2Fpythonnet%2Fissues%2Fnew%2Fchoose
sigbjornhttps://github.com/sigbjorn
pythonnet:masterhttps://github.com/pythonnet/pythonnet/tree/master
Conversation 32 https://github.com/pythonnet/pythonnet/pull/239
Commits 16 https://github.com/pythonnet/pythonnet/pull/239/commits
Checks 0 https://github.com/pythonnet/pythonnet/pull/239/checks
Files changed https://github.com/pythonnet/pythonnet/pull/239/files
Please reload this pagehttps://github.com/pythonnet/pythonnet/pull/239/files
Constructor argument matching supports simple int to (float|double) types https://github.com/pythonnet/pythonnet/pull/239/files#top
Show all changes 16 commits https://github.com/pythonnet/pythonnet/pull/239/files
2a2c9c7 added intial test that illustrates how int->double conversion works i… sigbjorn Jun 30, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/2a2c9c71ec0c6e54d95ca0a950dccbf07d323d1b
78dca29 ease windows development, - default settings after checkout reflectin… sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/78dca296e7afc27c491544818dcf2610eebc64d9
af1b937 added method tests for simple promotions int->float, int->double sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/af1b937c6b342bfad304351329265dcf8959237b
24baadf extending test to cover negative outcome of bool->double|float sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/24baadffeef457fb9b8c9f2cebc42aaae3ca95ba
bde4258 adding default ct to challenge the matching mechanism sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/bde42585a297cf57a8aca30d42f63cccfdd83df3
c8c8d8c merged extra tests sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/c8c8d8cc8e40dcacaa0cb469c48ff9dbf8d432d3
a65d793 adding test, and print-out warning for the not yet implemented feature sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/a65d7930936f9b8d9511e542974e371817d71261
e698b57 added more test for illustrating super/sub-class and argument passing… sigbjorn Jul 3, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/e698b57af58115568107f6a5275e2d3302b2b465
1fd75b3 fixed py 2.7 syntax for super, plus fixed typo sigbjorn Jul 4, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/1fd75b3b194c55b97ea757b7392e72be22a2895a
fb9b21e reverted the .sln to unmodified state sigbjorn Jul 4, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/fb9b21e5cf5c8ab2fe4d08e178c9d571b9f1ba7c
9e1d72b reverting changes to runtime and clrmodule projects sigbjorn Jul 4, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/9e1d72b213de710f525dcad3d59d6167fc2f6884
0e2cd12 Reverting changes to Console, embed_tests and testing .csproj files sigbjorn Jul 4, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/0e2cd12ccdd0dd0de7abfd2cfff990164965db5f
e58d5b2 Hopefully fixed py 2.6 issues sigbjorn Jul 4, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/e58d5b25cf35b9cc28b00425bfd6b24c39eab0d6
8602823 Merge branch 'ct_arg_match_fix' of https://github.com/sigbjorn/python… sigbjorn Jul 4, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/8602823a4e6f5d4375f5499a1f4241f00367bb69
bdbaa62 SimplePromotableType simplified, returns true if src is int-type and … sigbjorn Jul 23, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/bdbaa626a496354d1eaf2f5f2d6739f4dbe627b9
478b632 Merge branch 'master' into ct_arg_match_fix sigbjorn Jul 30, 2016 https://github.com/pythonnet/pythonnet/pull/239/commits/478b632c1a7a4392e4f7e6688c326b8d0b546c4d
Clear filters https://github.com/pythonnet/pythonnet/pull/239/files
Please reload this pagehttps://github.com/pythonnet/pythonnet/pull/239/files
Please reload this pagehttps://github.com/pythonnet/pythonnet/pull/239/files
methodbinder.cs https://github.com/pythonnet/pythonnet/pull/239/files#diff-237dc718ad5424f5476d2ebbbc4e5164c95901bd2a4c2daaf8ca6fc9f9d3a5fb
constructortests.cs https://github.com/pythonnet/pythonnet/pull/239/files#diff-5f0b4ab8cd709b1fe58dd388f49889a89fb6c25245cf3986fcb9a8542761d78b
methodtest.cs https://github.com/pythonnet/pythonnet/pull/239/files#diff-1d0f6055444d3a45c61ebb7e0e5b13a3df067c3b7bd870bb20e32e66f73b3ee9
test_constructors.py https://github.com/pythonnet/pythonnet/pull/239/files#diff-7e58c46f3921b90e66810d3bfd6aecf8c42213d0362bf535f3656cb07c6e4c08
test_method.py https://github.com/pythonnet/pythonnet/pull/239/files#diff-466ca471fe877d2ed8ea2c63abefa78808471ab8c26e858228178387a440a8f3
src/runtime/methodbinder.cshttps://github.com/pythonnet/pythonnet/pull/239/files#diff-237dc718ad5424f5476d2ebbbc4e5164c95901bd2a4c2daaf8ca6fc9f9d3a5fb
View file https://github.com/pythonnet/pythonnet/blob/478b632c1a7a4392e4f7e6688c326b8d0b546c4d/src/runtime/methodbinder.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pythonnet/pythonnet/pull/239/{{ revealButtonHref }}
https://github.com/pythonnet/pythonnet/pull/239/files#diff-237dc718ad5424f5476d2ebbbc4e5164c95901bd2a4c2daaf8ca6fc9f9d3a5fb
https://github.com/pythonnet/pythonnet/pull/239/files#diff-237dc718ad5424f5476d2ebbbc4e5164c95901bd2a4c2daaf8ca6fc9f9d3a5fb
https://github.com/pythonnet/pythonnet/pull/239/files#diff-237dc718ad5424f5476d2ebbbc4e5164c95901bd2a4c2daaf8ca6fc9f9d3a5fb
https://github.com/pythonnet/pythonnet/pull/239/files#diff-237dc718ad5424f5476d2ebbbc4e5164c95901bd2a4c2daaf8ca6fc9f9d3a5fb
src/testing/constructortests.cshttps://github.com/pythonnet/pythonnet/pull/239/files#diff-5f0b4ab8cd709b1fe58dd388f49889a89fb6c25245cf3986fcb9a8542761d78b
View file https://github.com/pythonnet/pythonnet/blob/478b632c1a7a4392e4f7e6688c326b8d0b546c4d/src/testing/constructortests.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pythonnet/pythonnet/pull/239/{{ revealButtonHref }}
https://github.com/pythonnet/pythonnet/pull/239/files#diff-5f0b4ab8cd709b1fe58dd388f49889a89fb6c25245cf3986fcb9a8542761d78b
https://github.com/pythonnet/pythonnet/pull/239/files#diff-5f0b4ab8cd709b1fe58dd388f49889a89fb6c25245cf3986fcb9a8542761d78b
https://github.com/pythonnet/pythonnet/pull/239/files#diff-5f0b4ab8cd709b1fe58dd388f49889a89fb6c25245cf3986fcb9a8542761d78b
src/testing/methodtest.cshttps://github.com/pythonnet/pythonnet/pull/239/files#diff-1d0f6055444d3a45c61ebb7e0e5b13a3df067c3b7bd870bb20e32e66f73b3ee9
View file https://github.com/pythonnet/pythonnet/blob/478b632c1a7a4392e4f7e6688c326b8d0b546c4d/src/testing/methodtest.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pythonnet/pythonnet/pull/239/{{ revealButtonHref }}
https://github.com/pythonnet/pythonnet/pull/239/files#diff-1d0f6055444d3a45c61ebb7e0e5b13a3df067c3b7bd870bb20e32e66f73b3ee9
https://github.com/pythonnet/pythonnet/pull/239/files#diff-1d0f6055444d3a45c61ebb7e0e5b13a3df067c3b7bd870bb20e32e66f73b3ee9
src/tests/test_constructors.pyhttps://github.com/pythonnet/pythonnet/pull/239/files#diff-7e58c46f3921b90e66810d3bfd6aecf8c42213d0362bf535f3656cb07c6e4c08
View file https://github.com/pythonnet/pythonnet/blob/478b632c1a7a4392e4f7e6688c326b8d0b546c4d/src/tests/test_constructors.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pythonnet/pythonnet/pull/239/{{ revealButtonHref }}
https://github.com/pythonnet/pythonnet/pull/239/files#diff-7e58c46f3921b90e66810d3bfd6aecf8c42213d0362bf535f3656cb07c6e4c08
https://github.com/pythonnet/pythonnet/pull/239/files#diff-7e58c46f3921b90e66810d3bfd6aecf8c42213d0362bf535f3656cb07c6e4c08
https://github.com/pythonnet/pythonnet/pull/239/files#diff-7e58c46f3921b90e66810d3bfd6aecf8c42213d0362bf535f3656cb07c6e4c08
https://github.com/pythonnet/pythonnet/pull/239/files#diff-7e58c46f3921b90e66810d3bfd6aecf8c42213d0362bf535f3656cb07c6e4c08
src/tests/test_method.pyhttps://github.com/pythonnet/pythonnet/pull/239/files#diff-466ca471fe877d2ed8ea2c63abefa78808471ab8c26e858228178387a440a8f3
View file https://github.com/pythonnet/pythonnet/blob/478b632c1a7a4392e4f7e6688c326b8d0b546c4d/src/tests/test_method.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/pythonnet/pythonnet/pull/239/{{ revealButtonHref }}
https://github.com/pythonnet/pythonnet/pull/239/files#diff-466ca471fe877d2ed8ea2c63abefa78808471ab8c26e858228178387a440a8f3
https://github.com/pythonnet/pythonnet/pull/239/files#diff-466ca471fe877d2ed8ea2c63abefa78808471ab8c26e858228178387a440a8f3
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.