python3内建模块-总述

1、介绍

builtins.py模块是python自定义的一个模块,包含多种常用类和函数,有时候也直接称为内置函数。

该模块可以不import而直接使用。

(1)基础数据类型的类

int、double、bool、complex,str,tuple,list,dict,set

(2)反射

hasattr、getattr、setattr、delattr

(3)字符编码

ascii、bytearray、bytes、chr、ord

(4)数值处理

abs、hex、oct、bin、round、divmod、format、pow

(5)集合

all、any、max、len、iter、min、next、range、reversed、sorted、slice、sum

enumerate、frozenset、map

(6)类和对象

callable、classmethod、globals、hash、help、id

compile、eval、exec、filter、isinstance、issubclass、locals、memoryview

object、property、repr、staticmethod、super、type、vars、zip、__import__、reload

(7)输入输出

dir、input、open、print

 

2、动态和静态

3、转换

大多数类支持str类型向其转换,但bool并不支持。

posted @ 2023-07-05 19:57  挖洞404  阅读(28)  评论(0编辑  收藏  举报