|
Description:
|
|
Sponsored by DigitalOcean: http://do.co/python
Brian #1: A brief tour of Python 3.7 data classes
- a great write-up of the upcoming data classes via Anthony Shaw
- “Data classes are a way of automating the generation of boiler-plate code for classes which store multiple properties. They also carry the benefit of using Python 3’s new type hinting.”
- Default magic methods
- In the default setting, any dataclass will implement
__init__, __repr__, __str__ and __eq__ for you.
- The
__init__ method will have keyword-arguments with the same type annotations that are specified on the class.
- The
__eq__ method will compare all dataclass attributes in order.
- All fields are declared at the top of the class and type hinting is required.
- Also covered
- type hinting
- mutability (and frozen)
- customizing the fields
- post-init processing : optional
__``*post_init_*``_ will run after the generated _``*_init_*``_
- inheritance
Michael #2: SQLite [The Databaseology Lectures - CMU Fall 2015]
Brian #3: dryable : a useful dry-run decorator for python
test_something.py
from something import return_something
import dryable
def test_normal_return():
dryable.set(False)
assert return_something() == 'something'
def test_dry_return(capsys):
dryable.set(True)
assert return_something() == 'foo'
Michael #4:
- These are some pretty cool examples.
Brian #5: PEP Explorer - Explore Python Enhancement Proposals
- Cool idea. Might need some work though. I can’t find any accepted PEPs for 3.7, including 557, data classes.
- I’m ok with giving Anthony some shade on this, as we highlighted his writing in the first item.
Michael #6: TKInter Tutorial
- via @likegeeks
- Create your first GUI application
- Create a label and button widgets
- Input and combo boxs, menus, progressbars and more
Our news
Michael
- I built something with Gooey this weekend, it was wonderful.
- Self-serve team purchases and discounts at Talk Python Training
|