zoukankan      html  css  js  c++  java
  • Help on module pyclbr:

    Help on module pyclbr:

    NAME
    pyclbr - Parse a Python module and describe its classes and methods.

    FILE
    d:programdataanaconda2libpyclbr.py

    DESCRIPTION
    Parse enough of a Python file to recognize imports and class and
    method definitions, and to find out the superclasses of a class.

    The interface consists of a single function:
    readmodule_ex(module [, path])
    where module is the name of a Python module, and path is an optional
    list of directories where the module is to be searched. If present,
    path is prepended to the system search path sys.path. The return
    value is a dictionary. The keys of the dictionary are the names of
    the classes defined in the module (including classes that are defined
    via the from XXX import YYY construct). The values are class
    instances of the class Class defined here. One special key/value pair
    is present for packages: the key '__path__' has a list as its value
    which contains the package search path.

    A class is described by the class Class in this module. Instances
    of this class have the following instance variables:
    module -- the module name
    name -- the name of the class
    super -- a list of super classes (Class instances)
    methods -- a dictionary of methods
    file -- the file in which the class was defined
    lineno -- the line in the file on which the class statement occurred
    The dictionary of methods uses the method names as keys and the line
    numbers on which the method was defined as values.
    If the name of a super class is not recognized, the corresponding
    entry in the list of super classes is not a class instance but a
    string giving the name of the super class. Since import statements
    are recognized and imported modules are scanned as well, this
    shouldn't happen often.

    A function is described by the class Function in this module.
    Instances of this class have the following instance variables:
    module -- the module name
    name -- the name of the class
    file -- the file in which the class was defined
    lineno -- the line in the file on which the class statement occurred

    CLASSES
    Class
    Function

    class Class
    | Class to represent a Python class.
    |
    | Methods defined here:
    |
    | __init__(self, module, name, super, file, lineno)

    class Function
    | Class to represent a top-level Python function
    |
    | Methods defined here:
    |
    | __init__(self, module, name, file, lineno)

    FUNCTIONS
    readmodule(module, path=None)
    Backwards compatible interface.

    Call readmodule_ex() and then only keep Class objects from the
    resulting dictionary.

    readmodule_ex(module, path=None)
    Read a module file and return a dictionary of classes.

    Search for MODULE in PATH and sys.path, read and parse the
    module and return a dictionary with one entry for each class
    found in the module.

    DATA
    __all__ = ['readmodule', 'readmodule_ex', 'Class', 'Function']

  • 相关阅读:
    欧拉回路 定理
    UESTC 1087 【二分查找】
    POJ 3159 【朴素的差分约束】
    ZOJ 1232 【灵活运用FLOYD】 【图DP】
    POJ 3013 【需要一点点思维...】【乘法分配率】
    POJ 2502 【思维是朴素的最短路 卡输入和建图】
    POJ 2240 【这题貌似可以直接FLOYD 屌丝用SPFA通过枚举找正权值环 顺便学了下map】
    POJ 1860【求解是否存在权值为正的环 屌丝做的第一道权值需要计算的题 想喊一声SPFA万岁】
    POJ 1797 【一种叫做最大生成树的很有趣的贪心】【也可以用dij的变形思想~】
    js 实现slider封装
  • 原文地址:https://www.cnblogs.com/YingxuanZHANG/p/8808861.html
Copyright © 2011-2022 走看看