X Tutup
The Wayback Machine - https://web.archive.org/web/20250608161841/https://github.com/python/cpython/issues/92743
Skip to content

Anomalous copyright symbol in typing.TypeVar docs #92743

Closed
@nmusolino

Description

@nmusolino

Documentation

Currently, the documentation for typing.TypeVar contains an example that is introduced this way:

type variables are particularly useful for annotating classmethods that serve as alternative constructors. In the following example (© Raymond Hettinger), the type variable C is bound to the Circle class through the use of a forward reference.

In general, code examples in the documentation are released under a Zero-Clause BSD License.

Is the copyright symbol © in this case meant to be a formal claim of copyright over this particular example, or is the symbol being used colloquially to acknowledge the author (@rhettinger)?

If it is being used colloquially, I suggest the phrasing be changed to acknowledge the author of the example without using the copyright symbol (with all its legal connotations), such as:

In the following example (by Raymond Hettinger) ...

If the copyright symbol is indeed a formal assertion of copyright, I suggest we replace this example with a snippet that is unencumbered by a private copyright. For example, the typing.Type docs contain a similar example:

class User: ...
class BasicUser(User): ...
class ProUser(User): ...
class TeamUser(User): ...

# Accepts User, BasicUser, ProUser, TeamUser, ...
def make_new_user(user_class: Type[User]) -> User:
    # ...
    return user_class()

This would ensure code examples in the documentation all share a uniform, well-understood copyright status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.9only security fixesdocsDocumentation in the Doc direasytopic-typing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup