Don't reinvent Sandwich. (Decorator and with statement)

  • R2
  • 第 1 天,16:10‑16:55
  • 中文演講/英文投影片
  • 最佳實踐與慣例
  • 入門

Content:
1. Concept of reuse "sandwich"
2. decorator
2.1 Quick introduction
2.2 How decorator save you from repeat in yourself
2.3 Example
3. with statement
3.1 Quick introduction
3.2 How with statement save you from repeat in yourself
3.3 Example

演講詳細內容

Python use 'def' to make a subroutine, which could separate the work, make the code more clear and most important: we could reuse them. Python Decorator and "with" statement could also do the same thing but in another way. Just like the bread of the sandwich which wrap the stuffing. Could we reuse this "sandwich bread" to make our code clear and easier??? The goal is to let target audiences has a new angle of view to these two python basic syntax. Quick introduction on basic syntax will be included.

講者介紹

蕭聖穎 (Stanley Hsiao)

Use python from 2005.
IC designer who want to benefit the world.