[Python-3000] Adaptation vs. Generic Functions

Tim Hochberg tim.hochberg at ieee.org
Wed Apr 12 22:18:05 CEST 2006


This is just a little update on my rewrite of pprint. I've continued to 
clean up and optimize this. If anyone wants to look at it, I've updated 
the code here:
	http://members.cox.net/~tim.hochberg/pprint2.py
[The changes are probably not signifigant enough to justify another 
posting of the code to the group.]

The most interesting thing is that the code is now marginally faster for 
saferepr and over twice as fast for pformat than the original pprint.py. 
That's according to _perftest, a benchmark I make no great claims for. 
Still, I think it shows that, with a little caching, there's no reason 
that even a pure python protocol implementation need be slow.

Regards,

-tim



More information about the Python-3000 mailing list