On Sunday 30 November 2003 03:44 pm, Oren Tirosh wrote: > Instead of converting `expr` to repr(expr) convert it first to (`expr`) > or even (`(expr)`) and make sure it still compiles into exactly the same > bytecode. It should catch all the problem you mention except backticks > in comments and strings. These need manual inspection. I don't know if it should be *that* mechanical; there are a lot of places where I've seen " 'something %s' % repr(foo)" when I think it's much more clearly written as " 'something %r' % foo". I don't know which is the officially preferred style, but if it's the latter (and I hope it is ;)) then it may not be good to mechanically change backticks to a repr call. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4