On Jan 27, 4:14 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: [...] > 1. Starting from the classic idea (lambda x:x%x)('lambda x:x%x') I got > the following > v=(lambda x:x%('"''""'+x+'"''""'))("""(lambda x:x%%('"''""'+x+'"''""')) > (%s)""")
A bit more readable: v1=(lambda x:x%('r\"'+x+'\"'))(r"(lambda x:x%%('r\"'+x+'\"'))(%s)") To Dan and Boris, this is cheating:-) I particularly like Boris's "solution", it bends the rule very nicely! Although you should get a NameError, not a SyntaxError for python < 3.0. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list