Python标准库:内置函数repr(object)
2015-03-14 11:17
288 查看
本函数是返回对象object的详细说明字符串。
例子:
结果输出如下:
range(0, 5)
Type help() for interactive help, or help(object) for help about object.
512
[2, 4, 5]
蔡军生 QQ:9073204 深圳
例子:
#repr() print(repr(range(5))) print(repr(help)) print(repr(0x200)) print(repr([2,4,5]))
结果输出如下:
range(0, 5)
Type help() for interactive help, or help(object) for help about object.
512
[2, 4, 5]
蔡军生 QQ:9073204 深圳
相关文章推荐
- Python标准库:内置函数repr(object)
- Python标准库:内置函数repr(object)
- Python标准库:内置函数callable(object)
- Python标准库:内置函数delattr(object, name)
- Python标准库:内置函数isinstance(object, classinfo)
- Python标准库:内置函数iter(object[, sentinel])
- Python标准库:内置函数iter(object[, sentinel])
- Python标准库:内置函数ascii(object)
- Python标准库:内置函数setattr(object, name, value)
- Python标准库:内置函数id(object)
- Python标准库:内置函数help([object])
- Python标准库:内置函数object()
- Python标准库:内置函数delattr(object, name)
- Python标准库:内置函数getattr(object, name[, default])
- Python标准库:内置函数exec(object[, globals[, locals]])
- Python标准库:内置函数id(object)
- Python标准库:内置函数callable(object)
- Python标准库:内置函数exec(object[, globals[, locals]])
- Python标准库:内置函数hasattr(object, name)
- Python标准库:内置函数iter(object[, sentinel])