Python string formatting: % vs concatenation
<p>I'm developing an application in which I perform some requests to get an object id. After each one of them, I call a method (<code>get_actor_info()</code>) passing this id as an argument (see code below).</p>

<pre><code>ACTOR_CACHE_KEY_PREFIX = 'actor_'

def get_actor_info(actor_id):
    cache_key = ACTOR_CACHE_KEY_PREFIX + str(actor_id)
</code></pre>

<p>As can be noticed, I'm casting <code>actor_id</code> to <code>string</code> and concatenating it with a prefix. However, I know I could do it in multiple other ways (<code>.format()</code> or <code>'%s%d'</code>, for instance) and that results in my question: would <code>'%s%d'</code> be better than string concatenation in terms of readability, code convention and efficiency?</p>

<p>Thanks</p>