[issue6743] pprint.pprint should support no objects to print blank lines allow args

2011-07-15 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Here’s a first draft at a patch. I’ve added a module-level print function and a PrettyPrinter.print method which does the real work. The functions have a signature compatible with print, but I have changed one default value: sep defaults to

[issue6743] pprint.pprint should support no objects to print blank lines allow args

2011-03-08 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6743 ___ ___

[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-09-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: And use keyword-only arguments :) -- nosy: +Merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6743 ___

[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-08-21 Thread Demur Rumed
Demur Rumed junkm...@hotmail.com added the comment: I've included a patched version. I went with using a function signature of def pprint(*object, stream=None, indent=1, width=80, depth=None) -- nosy: +serprex Added file: http://bugs.python.org/file14765/pprint.py

[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Changing the signature of a well-used function is dangerous. Why not add a function named pprint.print, with the exact same signature as __builtin__.print? -- nosy: +amaury.forgeotdarc ___

[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-08-20 Thread Mary Stern
New submission from Mary Stern maryst...@yahoo.com: Using print in python 3 I would like to simple replace print with pprint.pprint. However pprint cannot be called with no arguments, so this cannot currently be done (the error is TypeError: pprint() takes at least 1 positional argument (0

[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-08-20 Thread Mary Stern
Mary Stern maryst...@yahoo.com added the comment: Sorry: you also need to print out the args! :) .. like this: def pprint(object='\n', *args, stream=None, indent=1, width=80, depth=None): Pretty-print a Python object to a stream [default is sys.stdout]. printer = PrettyPrinter(