title: How to cast tuple into namedtuple?
body: <p>I'd like to use namedtuples internally, but I want to preserve compatibility with users that feed me ordinary tuples.</p>
  <pre><code>from collections import namedtuple
  
  tuple_pi = (1, 3.14, &quot;pi&quot;)  #Normal tuple 
  
  Record = namedtuple(&quot;Record&quot;, [&quot;ID&quot;, &quot;Value&quot;, &quot;Name&quot;])
  
  named_e = Record(2, 2.79, &quot;e&quot;)  #Named tuple
  
  named_pi = Record(tuple_pi)  #Error
  TypeError: __new__() missing 2 required positional arguments: 'Value' and 'Name'
  
  tuple_pi.__class__ = Record
  TypeError: __class__ assignment: only for heap types
  </code></pre>