• Eric V. Smith's avatar
    Trivial dataclass cleanups: (GH-6218) · f96ddade
    Eric V. Smith yazdı
    - When adding a single element to a list, use .append() instead of
      += and creating a new list.
    - For consistency, import the copy module, instead of just deepcopy. This
      leaves only a module at the class level, instead of a function.
    - Improve some comments.
    - Improve some whitespace.
    - Use tuples instead of lists.
    - Simplify a test.
    f96ddade
dataclasses.py 38.9 KB