On May 31, 8:35 am, Gaetan de Menten <[email protected]> wrote: > Looks great to me... except for the metaclass trick which is quite > ugly. Is there really no other way?
I believe not, because of syntax incompatibilities (the metaclass= in 3.x class declarations gives a SyntaxError on 2.x) - that's why the exec hack needs to be there. This technique is the one used by "six", Benjamin Peterson's very useful 2.x-3.x compatibility library, which is where I "borrowed" it from :-) http://pybites.blogspot.com/2010/06/six-python-23-compatibility-helpers.html I agree it's not pretty, but hopefully users won't have to see below the Entity abstraction, most of the time anyway ... Regards, Vinay Sajip -- You received this message because you are subscribed to the Google Groups "SQLElixir" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlelixir?hl=en.
