Can I create a subclass derived from metaclass like this?
<p>I tried to create a class that inherit from a metaclass declared in the superclass, I did like that:</p>

<pre><code>from sqlalchemy import Column, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker


class Database(object):
    """
        Class that holds all data models classes and functions
    """
    def __init__(self, wenDbPath = "test.db"):
        self.engine = create_engine('sqlite:///' + "c:/"+wenDbPath, echo=False)
        self.Session = sessionmaker(bind=self.engine)
        **self.Base** = declarative_base() # This returns a metaclass.
        self.Base.metadata.create_all(self.engine)
        self.session = self.Session()

    class Element(**self.Base**):
        __tablename__ = 'elements'
        idNumber = Column(String(255), primary_key=True)
        smallDiscription = Column(String(50), nullable=False)
        longDiscription = Column(String())
        webLink = Column(String())

        def __init__(self, idNumber, smallDiscription, longDiscription, webLink):
            self.idNumber = idNumber
            self.longDiscription = longDiscription
            self.smallDiscription = smallDiscription
            self.webLink = webLink
        def __repr__(self):
            return "&lt;Element ('%s : %s')&gt;" % (self.idNumber, self.smallDiscription)
</code></pre>

<p>Python gives me the following message</p>

<blockquote>
  <p>class Element(self.Base):
  NameError: name 'self' is not defined</p>
</blockquote>

<p>How can I do something like this?</p>

<p>Thank you in advance. </p>
