This commit resolves all outstanding duplicate label
and duplicate citation warnings.
I have not yet addressed unreferenced footnote warnings.
I took the general strategy of replacing a target above a section heading
with references directly to that section heading,
or where impractical, disambiguting the target with ``PEP NNN``.
I also converted all the citations in PEP 482 to links,
as they were causing duplicate citation warnings.
Changes detected by Topy (https://github.com/intgr/topy), all changes
verified by hand, false positives have been omitted.
These range from straight-out misspellings to debatable hyphen placement.
The hyphen changes are supported by grammar manuals of style.
The example with `Concrete` and `Template` is supposed to highlight that adding properties to a protocol in the implementation of a method is not supported, and does not add to the required signature of the protocol.
However, this also has the problem of `Concrete` not being a `Template` anyway because it is missing that `method`.
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.
* Rename `@runtime` to `@runtime_checkable`
* Postpone making mappings and sequences protocols, this can be done later in Python 3.8
* Update the implementation status
* More strict and precise specification for `isinstance()` and `issubclass()` with protocols.
* Few typos
* Add covariant mutable overriding and overriding variance to rejected ideas
* Update the notes on runtime implementation
* Add one more argument for prohibiting variance overrides
Note: there's an open question about whether interface variance should be inferred or be user-declared (defaulting to invariant unless declared otherwise). The current draft uses inferred invariance. See e.g. discussion at https://github.com/python/peps/pull/243#issuecomment-295826456.