Speaker

Raymond Hettinger

Material

Note

  • What are dataclasses for ?
    • mutable data holder
    • simplifying the process of writing the class
  • Comparison with Named Tuples
    • dataclass
      • mutable
      • unhashable
      • more memory usage
      • more efficient
    • named tuple
      • immutable
      • hashable
      • less memory usage
      • less efficient
  • Freezing and Ordering
    • @dataclass(order=True, frozen=True)
  • Custom Field Specifications
    • field(default_factory=list)
    • field(hash=False)
    • field(repr=False)
    • field(compare=False)

Share on: TwitterFacebookEmail


Published

Category

PyCon US 2018

Tags

Contact