code: def is_class_sealed(klass):
      
      mro = inspect.getmro(klass)
      new = False
  
      if mro[-1] is object:
          mro = mro[:-1]
          new = True
  
      for kls in mro:
          if new and '__dict__' in kls.__dict__:
              return False
  
          if not hasattr(kls, '__slots__'):
              return False
  
      return True
docs: Whether or not the supplied class can accept dynamic properties.
  
      @rtype: C{bool}
      @since: 0.5