python的bif介绍

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python的bif介绍相关的知识,希望对你有一定的参考价值。

Python是面向对象的解释性程序设计语言,Python的语法简洁,特点是用空白符作为语句缩进

BIF(bulit in function)内置函数,就是Python自身提供的函数功能,编程者直接使用即可,在Python或IDLE Shell中使用  dir(__builtins__)  命令查看Python的内置函数。

 1 [ArithmeticError, AssertionError, AttributeError, BaseException, BlockingIOError, BrokenPipeError, BufferError, BytesWarning,
 2  ChildProcessError, ConnectionAbortedError, ConnectionError, ConnectionRefusedError, ConnectionResetError,
 3  DeprecationWarning, EOFError, Ellipsis, EnvironmentError, Exception, False, FileExistsError, FileNotFoundError, 
 4 FloatingPointError, FutureWarning, GeneratorExit, IOError, ImportError, ImportWarning, IndentationError, IndexError,
 5  InterruptedError, IsADirectoryError, KeyError, KeyboardInterrupt, LookupError, MemoryError, NameError, None, 
 6 NotADirectoryError, NotImplemented, NotImplementedError, OSError, OverflowError, PendingDeprecationWarning,
 7  PermissionError, ProcessLookupError, ReferenceError, ResourceWarning, RuntimeError, RuntimeWarning, StopIteration,
 8  SyntaxError, SyntaxWarning, SystemError, SystemExit, TabError, TimeoutError, True, TypeError, UnboundLocalError, 
 9 UnicodeDecodeError, UnicodeEncodeError, UnicodeError, UnicodeTranslateError, UnicodeWarning, UserWarning, 
10 ValueError, Warning, WindowsError, ZeroDivisionError, _, __build_class__, __debug__, __doc__, __import__, __loader__,
11  __name__, __package__, __spec__, abs, all, any, ascii, bin, bool, bytearray, bytes, callable, chr, classmethod, compile,
12  complex, copyright, credits, delattr, dict, dir, divmod, enumerate, eval, exec, exit, filter, float, format, frozenset, 
13 getattr, globals, hasattr, hash, help, hex, id, input, int, isinstance, issubclass, iter, len, license, list, locals, map, 
14 max, memoryview, min, next, object, oct, open, ord, pow, print, property, quit, range, repr, reversed, round, set,
15  setattr, slice, sorted, staticmethod, str, sum, super, tuple, type, vars, zip]

 

当编程者需要某个BIF的介绍时,可以通过语句  help(input) 的形式查看Python提供的介绍。

 

以上是关于python的bif介绍的主要内容,如果未能解决你的问题,请参考以下文章

Python的一些BIF

Python 学习笔记 -- 一些常用的BIF

python的35个常见内置函数(BIF)

python24 跟类相关的BIF

Python从简单案列中揭示常用内置函数以及数据类型

python类和函数拾遗——继承bif(内置函数)魔法方法