This is a terrific patch. I've added http://www.sqlalchemy.org/trac/ticket/2339 for this and am hoping to make a large pass through 0.7.4 today/tomorrow, which is mostly ready-to-go patches. thanks !
On Dec 3, 2011, at 7:55 AM, Fayaz Yusuf Khan wrote: > As of now, the attached dummy script would fail with an IndexError as > sqlalchemy is depending on the fact that __table_args__ is a non-empty tuple > (if it is a tuple in the first place). However, there are some use cases > (mostly involving mixins and inheritance) where it would be nice to allow a > class to return an empty tuple instead of a NoneType. > > I have attached a trivial patch for sqlalchemy which checks for the boolean > tautology of the table_args variable before extracting args and table_kw from > it. And it doesn't seem to break anything. > > Looking forward to your feedback. > -- > Fayaz Yusuf Khan > Cloud developer and architect > Dexetra SS, Bangalore, India > fayaz.yusuf.khan_AT_gmail_DOT_com > fayaz_AT_dexetra_DOT_com > +91-9746-830-823<let_table_args_handle_empty_tuples.diff><empty_table_args.py>
PGP.sig
Description: This is a digitally signed message part
