22 bookmarks. First posted by whargrove 5 weeks ago.
data classes automatically generate several dunder methods. If we don’t specify any options to the dataclass decorator, the generated methods are: __init__, __eq__, and __repr__. Python by default (not just for data classes) will implement __str__ to return the output of __repr__ ... a new dunder method was defined for any additional processing: __post_init__ ... By using options with the decorator, you can tailor data classes further for your use casepython
26 days ago by zephyr777
Python 3.7 is set to be released this summer, let’s have a sneak peek at some of the new features! If you’d like to play along at home with PyCharm, make sure you get PyCharm 2018.1 (or later if you’re reading this from the future). There are many new things in Python 3. via PocketIFTTT Pocket
4 weeks ago by bjbishop