Skip to content

Conversation

@isidentical
Copy link
Member

@isidentical isidentical commented Dec 10, 2019

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Thanks! Couple comments also here.

OS_DIRENTRY_STAT_METHODDEF
OS_DIRENTRY_INODE_METHODDEF
OS_DIRENTRY___FSPATH___METHODDEF
{"__class_getitem__", DirEntry_cls_getitem, METH_O|METH_CLASS, NULL},
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to use Argument Clinic for this (to be consistent with the rest of the code in this module)?

Copy link
Member Author

Choose a reason for hiding this comment

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

I dont know if it possible, contextlib also uses argument clinic but they seperated __class_getitem. I thought there is a catch about this but I can try to do this with argument clinic.

@isidentical
Copy link
Member Author

Closing since pep 585 accepted

@isidentical isidentical closed this Apr 6, 2020
@gvanrossum
Copy link
Member

Hm, os.DirEntry[str] still gives an error. Maybe it still needs a __class_getitem__ method?

@isidentical
Copy link
Member Author

I was going to send a new PR but couldnt see it on PEP 585

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.

5 participants