title: Python concatenating boolean to string doesn't work
body: <p>As a part of  program I wrote the following method (hidden is a boolean variable). It's located in an object called <code>Deltext</code>, which inherits a type called <code>DelMsg</code>. <code>info_msg()</code> is overriding and using a similar method in its parent type.</p>
  
  <pre><code>def info_msg(self):
      info = DelMsg.info_msg(self)
      if self.code == 'l':  # If message is long message
          return info + '#' + str(len(self.content)) + '#' + str(self.hidden)
      elif self.code == 'm':  # If message is snap message
          return info + '#' + str(self.timeout) + '#' + self.content
      else:  # If message is a normal message
          return info + '#' + self.content + '#' + str(self.hidden)
  </code></pre>
  
  <p>But every time I call the method (from the object instance) it displays an error: <code>TypeError: cannot concatenate 'str' and 'bool' objects</code>, and says the error is in the last line, even though <code>hidden</code> is parsed to string.</p>
  
  <p>Is there any way to solve this without using conditionals?</p>