Comment 3 for bug 950369

Revision history for this message
Jakub Wilk (jwilk) wrote :

Implementing your own string interpolation engine may sound scary at first, but in fact it should be quite easy. For example, pylint has a template parser that is just ~60 lines of code:
https://bitbucket.org/logilab/pylint/src/36355f1fe1fd/checkers/utils.py?at=default#cl-277

I took a different approach in lintian4python, which resulted in even shorted code:
https://bitbucket.org/jwilk/lintian4python/src/5e552f08d8f5/helpers/python/code-analysis?at=default#cl-292