Skip to content

Use built-in generics - #5050

Merged
srittau merged 1 commit into
python:masterfrom
srittau:builtin-generics2
Feb 23, 2021
Merged

srittau merged 1 commit into
python:masterfrom
srittau:builtin-generics2

Conversation

@srittau

@srittau srittau commented Feb 22, 2021

Copy link
Copy Markdown
Collaborator

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
Comment thread stdlib/cgi.pyi
def __init__(self, name: Any, value: Any) -> None: ...
def __repr__(self) -> str: ...

_list = list

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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