Skip to content

Refer to instance of class in metaclass #1507

Answered by Gobot1234
henribru asked this question in Q&A
Discussion options

You must be logged in to vote

This is something that I considered when writing PEP 673 but the idea never went anywhere. However in your case you can probably just use a type var bound to Message and take that and return it from .pb

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@henribru
Comment options

Answer selected by henribru
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants