any plans to make pprint() a builtin?

John Salerno johnjsal at
Mon May 15 16:48:03 CEST 2006

Ant wrote:
> Considering that the current:
> import pprint
> pprint.pprint(x)
> is hardly lengthy, I can't see how either of the alternatives proposed
> are any better.
>> python.pprint.pprint(x)
> 6 characters shorter, but considerably more keystrokes if you are using
> pprint more than once. Is it worth adding the 'python' builtin to save
> an import statement?
>> import py
>> py.std.pprint.pprint(x)
> Longer, messy, and what's the actual point? Wouldn't:
> import pprint as pp
> pp.pprint(x)
> be better, standard *and* shorter?

I guess the idea is that you can use the import py statement to access 
many other modules as well, without importing them all separately.

More information about the Python-list mailing list