Skip to content

Conversation

asottile
Copy link
Member

collections.X => collections.abc.X so links in docs work better

`collections.X` => `collections.abc.X` so links in docs work better
Copy link
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

I believe it's better to use Python 3 type names in docs, and although we don't use typing, generic types it provides are quite useful for docs at least. For example, typing.Set[str] shows details while no collections.Set nor frozenset do. With Sphinx ReST, it can be written as like:

(:class:`~typing.AbstractSet`\ [:class:`str`]) The set of keywords :func:`compile()` can take.

The downside is a such markup is not very clean when it's compared to the way we've written previously. What's your opinion?

@asottile
Copy link
Member Author

ooh yeah the typing names would be better. I'll try that in a followup and see how it looks. Bummer about the sphinx syntax though :/

@asottile asottile merged commit 58f7b31 into master Feb 27, 2018
@asottile asottile deleted the py3_abc_types branch February 27, 2018 03:50
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.

2 participants