Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
pprint Namespace Reference

Data Structures

class  PrettyPrinter
 

Functions

def pprint
 
def pformat
 
def saferepr
 
def isreadable
 
def isrecursive
 

Variables

list __all__
 
string _commajoin = ", "
 
 _sys_modules = sys.modules
 
 _id = id
 
 _len = len
 
 _type = type
 

Function Documentation

def pprint.isreadable (   object)
Determine if saferepr(object) is readable by eval().

Definition at line 69 of file pprint.py.

69 
70 def isreadable(object):
71  """Determine if saferepr(object) is readable by eval()."""
72  return _safe_repr(object, {}, None, 0)[1]
def pprint.isrecursive (   object)
Determine if object requires a recursive representation.

Definition at line 73 of file pprint.py.

73 
74 def isrecursive(object):
75  """Determine if object requires a recursive representation."""
76  return _safe_repr(object, {}, None, 0)[2]
def pprint.pformat (   object)
Format a Python object into a pretty-printed representation.

Definition at line 61 of file pprint.py.

61 
62 def pformat(object):
63  """Format a Python object into a pretty-printed representation."""
64  return PrettyPrinter().pformat(object)
def pprint.pprint (   object,
  stream = None 
)
Pretty-print a Python object to a stream [default is sys.sydout].

Definition at line 56 of file pprint.py.

56 
57 def pprint(object, stream=None):
58  """Pretty-print a Python object to a stream [default is sys.sydout]."""
59  printer = PrettyPrinter(stream=stream)
60  printer.pprint(object)
def pprint.saferepr (   object)
Version of repr() which can handle recursive data structures.

Definition at line 65 of file pprint.py.

65 
66 def saferepr(object):
67  """Version of repr() which can handle recursive data structures."""
68  return _safe_repr(object, {}, None, 0)[0]

Variable Documentation

list __all__
Initial value:
1 = ["pprint","pformat","isreadable","isrecursive","saferepr",
2  "PrettyPrinter"]

Definition at line 45 of file pprint.py.

string _commajoin = ", "

Definition at line 49 of file pprint.py.

_id = id

Definition at line 51 of file pprint.py.

_len = len

Definition at line 52 of file pprint.py.

_sys_modules = sys.modules

Definition at line 50 of file pprint.py.

_type = type

Definition at line 53 of file pprint.py.