Skip to content

sherry255/prettyprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

prettyprint

Build Status

Install

pip install git+git://github.com/sherry255/prettyprint.git

Usage

>>> from prettyprint import pprint
>>> pprint(True)
True
>>> pprint("aaaaa")
'aaaaa'
>>> pprint(b"aaaaa")
b'aaaaa'
>>> pprint(bytearray(b"123"))
bytearray(b'123')
>>> pprint(1)
1
>>> pprint(1.0)
1.0
>>> pprint({1, 2, 3})
{
  1,
  2,
  3,
}
>>> pprint(frozenset([1,2,3]))
{
  1,
  2,
  3,
}
>>> pprint([1, 2, 3])
[
  1,
  2,
  3,
]
>>> pprint({"a": {"b": "c"}})
{
  'a': {
    'b': 'c',
  },
}
>>> class A:
...     def __init__(self):
...         self.a = 1
...         self.b = 2
...
>>> pprint(A())
A {
  'a': 1,
  'b': 2,
}
>>> class B:
...     def __pprint__(self, depth, end):
...         print("<B>", end=end)
>>> pprint(B())
<B>

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages