def pprint(obj, *args, **kwargs): '''Pretty-printing function that can pretty-print OrderedDicts like regular dictionaries. ''' if isinstance(obj, OrderedDict): print(json.dumps(obj, *args, **kwargs)) else: py_pprint(obj, *args, **kwargs)
def pprint(obj, *args, **kwargs): """Pretty-printing function that can pretty-print OrderedDicts like regular dictionaries. Useful for printing the output of :meth:`marshmallow.Schema.dump`. """ if isinstance(obj, OrderedDict): print(json.dumps(obj, *args, **kwargs)) else: py_pprint(obj, *args, **kwargs)
def pprint(obj, *args, **kwargs) -> None: """Pretty-printing function that can pretty-print OrderedDicts like regular dictionaries. Useful for printing the output of :meth:`marshmallow.Schema.dump`. """ warnings.warn( "marshmallow's pprint function is deprecated and will be removed in marshmallow 4.", RemovedInMarshmallow4Warning, ) if isinstance(obj, collections.OrderedDict): print(json.dumps(obj, *args, **kwargs)) else: py_pprint(obj, *args, **kwargs)