New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>:

The indent argument produces different output in Python 2.6 and 3.0: 

Python 3.0a5+ (py3k:63349:63350M, May 16 2008, 00:37:17) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pprint
>>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
>>> stuff.insert(0, stuff[:])
>>> pprint.pprint(stuff, indent=4) 
[   ['spam', 'eggs', 'lumberjack', 'knights', 'ni'],
    'spam',
    'eggs',
    'lumberjack',
    'knights',
    'ni']


Python 2.6a3+ (trunk:63323, May 15 2008, 16:09:01) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pprint
>>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
>>> stuff.insert(0, stuff[:])
>>> pprint.pprint(stuff, indent=4) 
[   [   'spam', 'eggs', 'lumberjack', 'knights', 'ni'],
    'spam',
    'eggs',
    'lumberjack',
    'knights',
    'ni']

----------
components: Library (Lib)
messages: 66919
nosy: alexandre.vassalotti
priority: low
severity: normal
status: open
title: pprint produces different output in 2.6 and 3.0
type: behavior
versions: Python 2.6, Python 3.0

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2888>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to