FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Names of .NET types changed to better support generic types by lostmsu · Pull Request #1509 · pythonnet/pythonnet · GitHub

Names of .NET types changed to better support generic types - #1509

Merged
lostmsu merged 1 commit into
pythonnet:masterfrom
losttech:better-class-names
Aug 7, 2021
Merged

Names of .NET types changed to better support generic types#1509
lostmsu merged 1 commit into
pythonnet:masterfrom
losttech:better-class-names

Conversation

lostmsu commented Aug 5, 2021

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

Previously, Python.NET would produce confusing type names in certain scenarios (generic and/or nesting types).

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

Comment thread src/runtime/typemanager.cs Outdated
static string CleanupFullName(string fullTypeName)
{
// Cleanup the type name to get rid of funny nested type names.
string name = "CLR." + fullTypeName;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe clr.?

Comment thread src/runtime/typemanager.cs Outdated
target.Append(nonGenericName);

var arguments = clrType.GetGenericArguments();
target.Append('<');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could it make sense to use the "Python syntax" instead, i.e. square brackets?

lostmsu force-pushed the better-class-names branch from 0ae4bad to 15cf488 Compare August 7, 2021 03:55
lostmsu merged commit 4529fde into pythonnet:master Aug 7, 2021
lostmsu deleted the better-class-names branch August 7, 2021 04:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL