Skip to content

Missing import in example at dataclasses.rst  #91673

@xandrade

Description

@xandrade

Documentation

Found that the typing List is used in example, but import is missed at dataclasses.rst file.

In this example:

  @dataclass
  class D:
      x: List = []
      def add(self, element):
          self.x += element

the import from typing import List is missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions