Hi Folks,

I would like to load preformated strings from some persistence and apply current parameters to them.
But the simple numbered parameter markers can be mixed easily while creating string patterns. Thus i would like to address these parameter markers by name. So:

  1. Is there a way to name the parameter markers like python allows (instead of %1, %2, ...) ?
  2. What is the best way (workaround) to do this ?


Details:
So I want something like the python string functionality:
Qt Code:
  1. >>> "Hello %(first_name)s %(last_name)s!" % {"first_name":"Max", "last_name":"Power"}
  2. 'Hello Max Power!'
To copy to clipboard, switch view to plain text mode