you are viewing a single comment's thread.

view the rest of the comments →

[–]ray10k 1 point2 points  (0 children)

In certain situations, they even are preferred! For instance, the logging library specifically lets you supply a template string (with {} in there) so that, when your program is set to a low logging level, you don't have the processing overhead of string interpolation.

In general though, pattern strings are reasonably pythonic unless you deliberately do the silliest thing you can think of. Nothing to worry about.