Python Bytes

#267 Python on the beach

Informações:

Sinopsis

Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Michael #1: Box: Python dictionaries with advanced dot notation access Want to treat dictionaries like classes? Box. small_box = Box({'data': 2, 'count': 5}) small_box.data == \ small_box['data'] == \ getattr(small_box, 'data') == \ small_box.get('data') There are over a half dozen ways to customize your Box and make it work for you: Check out the new Box github wiki for more details and examples! Superset of dict See Types of Boxes as well Brian #2: Reading tracebacks in Python Trey Hunner “When Python encounters an error in your code, it will print out a traceback. Let's talk about how to use tracebacks to fix our code.” Brian’s commentary Tracebacks can feel like brick wall of error telling you “you suck”. But they are really meant to help you, and do, once you know how to read them. Probably should be one of the earlies