On 7/11/07, Mike Orr <[EMAIL PROTECTED]> wrote: > On 7/11/07, Jose Galvez <[EMAIL PROTECTED]> wrote: > > Dear Mike, > > I've read the doc string in the new sacontext and was just wondering why for > > add_engine_from_config do you have to explicitly pass None for the default > > connection? it would make more sense to pass 'default' or better yet nothing > > all all and assume the default engine. I understand that you are moving > > away from the the implicit to the explicit which is great, I just thought > > passing None to mean default is awkward when you could just as easily added > > None as the default in the method def. (the same could be said about > > add_engine) > > It is awkward but Python has no other built-in value for "default". > Using a string means people may spell it differently, and the > .metadata and .engine properties require a fixed value. Making it > optional means the second positional argument would sometimes move to > the first (like Pylons render_response("/template.html") vs > render_response("mako", "/template.html"), and I'm absolutely opposed > to that.
I released 0.3.1 which accepts "default", sacontext.DEFAULT, or None interchangeably to refer to the default engine. -- Mike Orr <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---