Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Sorry, the text needs to stand as-is. It is supposed to be a hint of what can be done, nothing more. The technique of t=x; x=y; y=t is somewhat basic and has general applicability -- there's nothing "complex" about it. Also, for short strings such as the one in the example, the translate approach is slower unless the used in a loop where the translation table is already built. BTW, the PEP itself is not primary documentation for users. It is meant to document the design discussion only. Feel free to post your recipe on ASPN or on the newsgroup. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10178> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com