• Python内建的对象列表


    Python内建的对象列表

    刚写Python肯定会遇到这样的情况,想写些什么,但又不知从何写起...
    在我看来问题在于我们不知道有什么东东可以拿来玩,这里列出Python的内建对象,稍微归类了一下,多看几遍代码自然笔上生花,行云流水,一气呵成,一口气500行不费劲儿...

    Built-in

    
    buildin = {
        '__build_class__': < built-in function __build_class__ >,
        '__doc__': "Built-in functions, exceptions, and other objects.
    
    Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
        '__import__': < built-in function __import__ >,
        'pow': < built-in function pow >,
        'sum': < built-in function sum > ,
        'abs': < built-in function abs > ,
        'max': < built-in function max > ,
        'min': < built-in function min > ,
        'ord': < built-in function ord >,
        'round': < built-in function round >,
        'format': < built-in function format >,
        'len': < built-in function len >,
        'bin': < built-in function bin >,
        'oct': < built-in function oct >,
        'divmod': < built-in function divmod >,
    
        'print': < built-in function print >,
        'next': < built-in function next >,
        'eval': < built-in function eval >,
        'repr': < built-in function repr >,
        'exec': < built-in function exec >,
    
        'ascii': < built-in function ascii >,
        'chr': < built-in function chr >,
        'hash': < built-in function hash >,
        'hex': < built-in function hex >,
    
        'hasattr': < built-in function hasattr >,
        'setattr': < built-in function setattr >,
        'getattr': < built-in function getattr >,
        'delattr': < built-in function delattr >,
    
        'issubclass': < built-in function issubclass >,
        'isinstance': < built-in function isinstance >,
    
        'globals': < built-in function globals >,
        'id': < built-in function id >,
        'dir': < built-in function dir >,
        'vars': < built-in function vars >,
        'locals': < built-in function locals >,
    
        'any': < built-in function any >,
        'all': < built-in function all >,
    
        'iter': < built-in function iter >,
        'open': < built-in function open >,
        'callable': < built-in function callable >,
        'input': < built-in function input >,
        'sorted': < built-in function sorted >,
        'compile': < built-in function compile >,
    
        'bool': < class 'bool' >,
        'tuple': < class 'tuple' > ,
        'set': < class 'set' > ,
        'dict': < class 'dict' > ,
        'str': < class 'str' > ,
        'int': < class 'int' > ,
        'bytearray': < class 'bytearray' > ,
        'enumerate': < class 'enumerate' >,
        'map': < class 'map' >,
        'slice': < class 'slice' >,
        'range': < class 'range' >,
        'True': True,
        'list': < class 'list' >,
        'float': < class 'float' >,
        'bytes': < class 'bytes' >,
        'type': < class 'type' > ,
        'zip': < class 'zip' >,
        'object': < class 'object' >,
        'super': < class 'super' > ,
    
        'False': False,
        'None': None,
        '__debug__': True,
        '_': None,
    
        '__name__': 'builtins',
        '__loader__': < class '_frozen_importlib.BuiltinImporter' > ,
        '__package__': '',
        '__spec__': ModuleSpec(name='builtins', loader= < class '_frozen_importlib.BuiltinImporter' >),
    
        'exit': 'Use exit() or Ctrl - Z plus Return to exit',
        'quit': 'Use quit() or Ctrl - Z plus Return to exit',
        'help': 'Type help() for interactive help, or help(object) for help about object.',
        'filter': < class 'filter' > ,
        'property': < class 'property' > ,
        'staticmethod': < class 'staticmethod' > ,
        'classmethod': < class 'classmethod' > ,
        'complex': < class 'complex' > ,
        'SystemExit': < class 'SystemExit' > ,
        'KeyboardInterrupt': < class 'KeyboardInterrupt' > ,
        'GeneratorExit': < class 'GeneratorExit' > ,
        'StopIteration': < class 'StopIteration' > ,
        'frozenset': < class 'frozenset' > ,
        'reversed': < class 'reversed' > ,
        'memoryview': < class 'memoryview' > ,
        'Ellipsis': Ellipsis,
        'NotImplemented': NotImplemented,
    
        'BaseException': < class 'BaseException' > ,
        'Exception': < class 'Exception' > ,
    
        'PendingDeprecationWarning': < class 'PendingDeprecationWarning' > ,
        'UserWarning': < class 'UserWarning' >,
        'UnicodeWarning': < class 'UnicodeWarning' >,
        'SyntaxWarning': < class 'SyntaxWarning' >,
        'RuntimeWarning': < class 'RuntimeWarning' >,
        'ResourceWarning': < class 'ResourceWarning' >,
        'BytesWarning': < class 'BytesWarning' >,
        'Warning': < class 'Warning' >,
        'ImportWarning': < class 'ImportWarning' >,
        'DeprecationWarning': < class 'DeprecationWarning' >,
        'FutureWarning': < class 'FutureWarning' >,
    
        'ConnectionRefusedError': < class 'ConnectionRefusedError' > ,
        'OverflowError': < class 'OverflowError' >,
        'IsADirectoryError': < class 'IsADirectoryError' >,
        'UnicodeEncodeError': < class 'UnicodeEncodeError' >,
        'OSError': < class 'OSError' >,
        'NotADirectoryError': < class 'NotADirectoryError' >,
        'FloatingPointError': < class 'FloatingPointError' >,
        'BlockingIOError': < class 'BlockingIOError' >,
        'MemoryError': < class 'MemoryError' >,
        'IndexError': < class 'IndexError' >,
        'ConnectionError': < class 'ConnectionError' >,
        'IndentationError': < class 'IndentationError' >,
        'TimeoutError': < class 'TimeoutError' >,
        'SystemError': < class 'SystemError' >,
        'ConnectionResetError': < class 'ConnectionResetError' >,
        'UnicodeTranslateError': < class 'UnicodeTranslateError' >,
        'ZeroDivisionError': < class 'ZeroDivisionError' >,
        'ImportError': < class 'ImportError' >,
        'UnboundLocalError': < class 'UnboundLocalError' >,
        'EOFError': < class 'EOFError' >,
        'AssertionError': < class 'AssertionError' >,
        'WindowsError': < class 'OSError' >,
        'FileNotFoundError': < class 'FileNotFoundError' >,
        'UnicodeDecodeError': < class 'UnicodeDecodeError' >,
        'BufferError': < class 'BufferError' >,
        'KeyError': < class 'KeyError' >,
        'IOError': < class 'OSError' >,
        'ArithmeticError': < class 'ArithmeticError' >,
        'AttributeError': < class 'AttributeError' >,
        'BrokenPipeError': < class 'BrokenPipeError' >,
        'ConnectionAbortedError': < class 'ConnectionAbortedError' >,
        'FileExistsError': < class 'FileExistsError' >,
        'TabError': < class 'TabError' >,
        'NameError': < class 'NameError' >,
        'ProcessLookupError': < class 'ProcessLookupError' >,
        'ReferenceError': < class 'ReferenceError' >,
        'PermissionError': < class 'PermissionError' >,
        'ValueError': < class 'ValueError' >,
        'LookupError': < class 'LookupError' >,
        'NotImplementedError': < class 'NotImplementedError' >,
        'SyntaxError': < class 'SyntaxError' >,
        'TypeError': < class 'TypeError' >,
        'ChildProcessError': < class 'ChildProcessError' >,
        'InterruptedError': < class 'InterruptedError' >,
        'EnvironmentError': < class 'OSError' >,
        'RuntimeError': < class 'RuntimeError' >,
        'UnicodeError': < class 'UnicodeError' > 
    }
    

    砖头


    码代码砌墙砖头是原材料,熟悉了各种砖头的形状特点,就可以平地起高楼了。

  • 相关阅读:
    《算法导论》第十章----基本数据结构
    《算法导论》第九章----中位数和顺序统计学
    《算法导论》第八章----线性时间排序(决策树+计数排序+基数排序)
    C++实现快速排序
    C++实现斐波那契第N项非递归与递归实现的时间比较
    C++实现用两个栈实现队列
    C++实现从尾到头打印链表(不改变链表结构)
    C++实现二叉树(建树,前序,中序,后序)递归和非递归实现
    Spark 大数据文本统计
    逻辑回归--参数解释+数据特征不独热编码+训练数据分布可视话
  • 原文地址:https://www.cnblogs.com/wancy86/p/python_buildin.html
Copyright © 2020-2023  润新知