I am under the impression that using format() is the canonically "right way
to do it". It is certainly more readable than using ''.join() and is more
semantically specific than string addition.

On Thu, Apr 9, 2015 at 1:35 PM, Chris Angelico <ros...@gmail.com> wrote:

> On Fri, Apr 10, 2015 at 4:29 AM, Travis Griggs <travisgri...@gmail.com>
> wrote:
> >
> >     if k + ‘_@‘ in documents:
> >
> >     timeKey = k + ‘_@‘
> >
> >     historyKey = thingID + ‘_’ + k
> >
> > I’m curious where others lean stylistically with this kind of thing. I
> see *at least* 2 other alternatives:
> >
>
> So few? I'd just use string addition. No need to worry about
> performance unless you actually have reason to believe it's a problem.
> String addition exists for a reason!
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to