title: Subclassing collections namedtuple
body: <p>Python's namedtuple can be really useful as a lightweight, immutable data class. I like using them for bookkeeping parameters rather than dictionaries. When some more functionality is desired, such as a simple docstring or default values, you can easily refactor the namedtuple to a class. However, I've seen classes that inherit from namedtuple. What functionality are they gaining, and what performance are they losing? For example, I would implement this as</p>
  
  <pre><code>from collections import namedtuple
  
  class Pokemon(namedtuple('Pokemon', 'name type level')):
      """
      Attributes
      ----------
      name : str
          What do you call your Pokemon?
      type : str
          grass, rock, electric, etc.
      level : int
          Experience level [0, 100]
      """
       __slots__ = ()
  </code></pre>
  
  <p>For the sole purpose of being able to document the attrs cleanly, and <code>__slots__</code> is used to prevent the creation of a <code>__dict__</code> (keeping the lightweight nature of namedtuples).</p>
  
  <p>Is there a better recommendation of a lightweight data class for documenting parameters? Note I'm using Python 2.7.</p>