Skip to content

Minor tweaks to PEP 544 #1046

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

Merged
merged 2 commits into from
May 13, 2019
Merged

Conversation

ilevkivskyi
Copy link
Member

cc @gvanrossum @JukkaL @ambv

This PR contains mostly minor wording tweaks plus a paragraph explicitly allowing class objects as implementations of protocols, previously there were questions whether it is actually allowed, see python/mypy#4536.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Where’s the text about classes inheriting from protocols?

pep-0544.txt Outdated
...
else:
# type of x is "int" here?
# Statically type of x is int statically,
Copy link
Member

Choose a reason for hiding this comment

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

Twice statically

@ilevkivskyi
Copy link
Member Author

ilevkivskyi commented May 12, 2019

Where’s the text about classes inheriting from protocols?

Do you mean normal classes inheriting from protocols or protocols inheriting from other protocols? These are in different sections. One is Explicitly declaring implementation other is Merging and extending protocols.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

I was referring to class objects as mentioned in the PR description. But now I see it’s okay.

@ilevkivskyi ilevkivskyi merged commit 8aecf9d into python:master May 13, 2019
@ilevkivskyi ilevkivskyi deleted the last-minor-tweaks-544 branch May 13, 2019 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants