[Python-3000] Hello World!
Manuel Kaufmann
humitos at gmail.com
Mon May 26 06:01:07 CEST 2008
El Sunday 25 May 2008 22:54:49 Terry Reedy escribió:
> In that case, have more patience and give the tracker discussion process
> more time.
Sorry, I didn't explain myself.
I want to discuss "How to should work pprint.pprint?" or "Why py3k not works
according to documentation?[1]"
I prefer the new way of showing it. Some times the old style don't like me.
Example (in py2.6):
>>> import pprint
>>> stuff = [1,2,3]
>>> pprint.pprint(stuff, indent=4)
[ 1, 2, 3]
>>> stuff.insert(0, stuff[:])
>>> pprint.pprint(stuff, indent=4)
[ [ 1, 2, 3], 1, 2, 3]
>>> stuff.insert(0, stuff[:])
>>> pprint.pprint(stuff, indent=4)
[ [ [ 1, 2, 3], 1, 2, 3], [ 1, 2, 3], 1, 2, 3]
I prefer this one (in py3k):
>>> import pprint
>>> stuff = [1,2,3]
>>> stuff.insert(0, stuff[:])
>>> pprint.pprint(stuff, indent=4)
[[1, 2, 3], 1, 2, 3]
>>> stuff.insert(0, stuff[:])
>>> pprint.pprint(stuff, indent=4)
[[[1, 2, 3], 1, 2, 3], [1, 2, 3], 1, 2, 3]
>>>
Now, if py3k is working fine, the documentation should be fix.
--
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
PyAr: http://www.python.com.ar/
More information about the Python-3000
mailing list