[sqlalchemy] What is declarative_base() exactly?

2013-09-23 Thread Edward Kim
Hi all, I have a really short experience of python so it can be really stupid question. I tried to understanding about declarative_base(). Example below: Base = declarative_base() class Bus(Base): __tablename__ = 'bus' In my understanding, That python code look like function

Re: [sqlalchemy] What is declarative_base() exactly?

2013-09-23 Thread Edward Kim
Oh, I see! It is return class literally. Thanks for your code. On Monday, 23 September 2013 23:28:11 UTC+10, Klauss wrote: On Mon, Sep 23, 2013 at 10:22 AM, Edward Kim onward...@gmail.comjavascript: wrote: Base = declarative_base() Base class 'sqlalchemy.ext.declarative.api.Base