---
title: "Python Design Patterns - Max Lai"
tags: PyConAPAC2022, 2022-organize, 2022-共筆
---
# Python Design Patterns - Max Lai
{%hackmd 3JQH2UcwQ1e5RMgz4GRiKg %}
<iframe src=https://app.sli.do/event/2PogqXP48VeQQkjYcXhMBT height=450 width=100%></iframe>
Slide link 投影片連結:https://speakerdeck.com/cclai999/python-design-patterns-at-pycon-apac-2022
YouTube link 演講影片連結:https://youtu.be/8GPd3D-aeTk
> Collaborative writing start from below
> 從這裡開始共筆
Speaker info:
- Senior manager of info tech dept @ Tungs' Taichung MetroHarbor Hospital 台中 童綜合醫院 資訊部 高級管理師
- Tech lead of intelligent healthcare application
- organizers of Taichung.py & Agile Taichung
code link: https://github.com/cclai999/pyconapac22-dp
Design pattern:
- A pattern is a proven solution to a problem in a context.
Q&A
- factory method
- would it be better if we build the node with `input_items` (no popping), and then determine if we need to build children according to some field/property of the node?
- In JsonMixin.to_dict():
- `for key, value in vars(self).items():`
- `if not (callable(value) or key == 'parent')`
- Would there be better way to determine?
Below is the part that speaker updated the talk/tutorial after speech
講者於演講後有更新或勘誤投影片的部份