【文件属性】:
文件名称:objprint:一个可以以人类可读格式打印Python对象的库
文件大小:16KB
文件格式:ZIP
更新时间:2021-03-10 12:28:40
Python
objprint
一个可以以人类可读格式打印Python对象的库
安装
pip install objprint
用法
objprint
使用objprint()来打印对象。
from objprint import objprint
class Position :
def __init__ ( self , x , y ):
self . x = x
self . y = y
class Player :
def __init__ ( self ):
self . name = "Alice"
self . age = 18
self . items = [ "axe" , "armor" ]
self . coins = { "gold" : 1 , "silver"
【文件预览】:
objprint-master
----.github()
--------workflows()
----src()
--------objprint()
----NOTICE.txt(549B)
----LICENSE(11KB)
----setup.py(1KB)
----README.md(3KB)
----Makefile(534B)
----tests()
--------test_config.py(2KB)
--------__init__.py(161B)
--------test_objstr.py(1KB)
--------test_basic.py(657B)
--------test_decorator.py(1KB)
----.gitignore(2KB)