This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2005-11-12.20:02:10
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

IMO, such a rewrite would expose too many of pprint's
internals and make the module harder to
use/understand/maintain.  Wouldn't it be better to stick
with the usual idiom for controlling the repr() formatting
of specific types by using a class wrapper:

>>> from pprint import pprint
>>> class Int(int):
	def __repr__(self):
		return hex(self)

>>> pprint([Int(x) for x in range(0x10000000,0x10000010)])
[0x10000000,
 0x10000001,
 0x10000002,
 0x10000003,
 0x10000004,
 0x10000005,
 0x10000006,
 0x10000007,
 0x10000008,
 0x10000009,
 0x1000000a,
 0x1000000b,
 0x1000000c,
 0x1000000d,
 0x1000000e,
 0x1000000f]
History
Date User Action Args
2007-08-23 16:11:29adminlinkissue1351692 messages
2007-08-23 16:11:29admincreate