<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 20 maj 2013, at 03:46, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Sun, May 19, 2013 at 4:27 PM, Gregory P. Smith <<a href="mailto:greg@krypto.org">greg@krypto.org</a>> wrote:<br><blockquote type="cite">Now you've got me wondering what Python would be like if repr, `` and<br>__repr__ never existed as language features. Upon first thoughts, I actually<br>don't see much downside (no, i'm not advocating making that change).<br>Something to ponder.<br></blockquote><br>I have pondered it many times, although usually in the form "Why do we<br>need both str and repr?"<br></blockquote></div><div><br></div><div>What if we did the opposite?</div><div><br></div><div>1. Make __str__() a protocol for arbitrary string conversion.</div><div>2. Move the current __repr__() contracts, both firm and informal to a new, extensible version of pprint.</div><div><br></div><div>There has been some discussion led by Raymond in 2010 about a general `pprint rewrite`__ and I'm willing to pick up the idea with a PEP for inclusion in 3.4.</div><div><br></div><div><br></div><div><br></div>__ <a href="http://bugs.python.org/issue7434">http://bugs.python.org/issue7434</a><div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-- <br>Best regards,<br>Ɓukasz Langa<br><br>WWW: <a href="http://lukasz.langa.pl/">http://lukasz.langa.pl/</a><br>Twitter: @llanga<br>IRC: ambv on #python-dev</div>
</div>
<br></div></body></html>