[ckan-dev] " '%s' % thing " vs " '{0}'.format(thing) "

Toby Dacre toby.okfn at gmail.com
Mon Jan 7 04:47:33 UTC 2013


Hi,

Whilst it is vital to be using the _('...').format(...) for translatable
content using more than 1 parameter to allow positional changes and as such
probably best to use this even if a single parameter so that if more are
added then broken code is less likely to be left incorrect.

However for non-translatable content I find the % syntax to be more
compact/readable

Is it just me who cares about this or should we try to have a single
approach?

cheers
toby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130107/bad54992/attachment.html>


More information about the ckan-dev mailing list