docopt / docopt.c

C-code generator for docopt language.
MIT License
318 stars 46 forks source link

We should not use __str__.replace() #4

Closed ffunenga closed 11 years ago

ffunenga commented 11 years ago

Instead of: out = out.replace('<<<???>>>', substition)

we should use something like [1] or

"%(tag_identifier)s is great!" % {'tag_identifier': 'docopt'}

[1] http://docs.python.org/2/library/string.html#template-strings

keleshev commented 11 years ago

:+1:

kblomqvist commented 11 years ago

Sure :)

ffunenga commented 11 years ago

Ok, I'll make a pull request in the near future!

kblomqvist commented 11 years ago

That would be most appreciated.

kblomqvist commented 11 years ago

Merged, https://github.com/docopt/docopt.c/pull/7