美文网首页
【Python】Instantiation, Module

【Python】Instantiation, Module

作者: 盐果儿 | 来源:发表于2023-05-09 17:05 被阅读0次

    What is instantiation?

    Instantiation is the process of creating an instance or an object of a class. 

    A class is a template that defines the properties and behaviors of an object.

    An instance is a special realization of that template with its own unique data and state.

    What is a module object in Python?

    In Python, a module is a file containing Python definitions and statements. When you import a module, Python executes the code in the module file and creates a module object that represents the module. The module object is an instance of the ModuleType class and it contains the module's attributes and functions.

    相关文章

      网友评论

          本文标题:【Python】Instantiation, Module

          本文链接:https://www.haomeiwen.com/subject/slorsdtx.html