Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use built-in generics #5050

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Use built-in generics #5050

merged 1 commit into from
Feb 23, 2021

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Feb 22, 2021

Let's test whether this works correctly. Cf. #4820

@srittau srittau changed the title Use built-in generic Use built-in generics Feb 22, 2021
@srittau srittau merged commit c8df617 into python:master Feb 23, 2021
@srittau srittau deleted the builtin-generics2 branch February 23, 2021 09:04
name: Any
value: Any
def __init__(self, name: Any, value: Any) -> None: ...
def __repr__(self) -> str: ...

_list = list
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this really necessary? It seems a bit weird to me.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it maybe because of this?

list: Optional[_list[Any]]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, without the type alias, there is an error, since list is aliased by this.

@srittau srittau mentioned this pull request Feb 23, 2021
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.

3 participants