Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"This is %(adjective)s readable Python in %(genetive)s opinion" % {"adjective":"more", "genetive":"my"}

> 'This is more readable Python in my opinion'

edit: variable names

Also, I agree that for this simple case, perl (and other's) simple dollar substitution is nicer.



Since there was a mention of extending the language in this thread, there's also:

http://lfw.org/python/Itpl.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: