Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Understanding Metaclass from Type

Yusuke Tamura
November 15, 2023
36

Understanding Metaclass from Type

みんなのPython勉強会 #99 LT枠

https://startpython.connpass.com/event/300831/

Yusuke Tamura

November 15, 2023
Tweet

Transcript

  1. @ 2023 Novasell, Inc. All Rights Reserved. Understanding Metaclass from

    Type 2023/11/15 みんなのPython勉強会(stapy) Lightning Talk NOVASELL.INC , Tamtam 1
  2. @ 2023 Novasell, Inc. All Rights Reserved. Introduction GitHub: @tamtam-fitness,

    X: @TamtamFitness, Zenn: Tamtam I’m Tamtam, japan-born-and-raised 💪 I’m into FastAPI🐍 Currently working at RAKSUL/NOVASELL📃📺
  3. @ 2023 Novasell, Inc. All Rights Reserved. https://techblog.raksul.com/ RAKSUL TechBlog

    社員インタビュー https://recruit.raksul.com/story/archives/engineer/ RAKSUL Engineer Recruitment Book https://raksulinc.notion.site/RAKSUL-Engineer-Recruit ment-Book-a1245092c4434b45b162a9fe277c169f RAKSUL 公式connpass https://raksul.connpass.com/ https://www.youtube.com/channel/UCyihWcvrHmE e-edcqdcJFsQ/ RAKSUL 公式YouTube RAKSUL 公式X https://twitter.com/raksuldev Find out more about RAKSUL
  4. @ 2023 Novasell, Inc. All Rights Reserved. 6 The type

    of an instance created is the class
  5. @ 2023 Novasell, Inc. All Rights Reserved. 7 The class

    itself is a type named “type”
  6. @ 2023 Novasell, Inc. All Rights Reserved. 8 Let’s look

    at the process of class definition to understand “type”
  7. @ 2023 Novasell, Inc. All Rights Reserved. 14 Class that

    creates class is called Metaclass “type” is one of Metaclassess By default, it’s set to type
  8. @ 2023 Novasell, Inc. All Rights Reserved. 15 Reference •

    Advanced Python Mastery - Section7: Meta Programming • Effective Python - 4章 メタクラスと属性