> On Sat, May 03, 2008 at 09:54:24AM +0900, Atsuo Ishimoto wrote: >> If requirement for ASCII-repr is popular enough, we can provide a >> built-in function like this: >> >> def repr_ascii(obj): >> return str(repr(obj).encode("ASCII", "backslashreplace"), "ASCII") > > It is hard to apply the function for repr(container). > repr(container).encode("unicode_escape") is the only way (at least I don't > see any other way).
I think Atsuo envisioned you to invoke "repr_ascii(container)". Regards, Martin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com