Well I would prefer not using None and rather making the user pass the
correct key, so that way default become no different they using any other
key and users could just as simply call their key "main" or what ever else
turns them on.  Assuming that they use the correct syntax in the ini file
(sqlalchemy.<key>.uri).  So what I would advocate is eliminating the special
"default" and just make users specify the correct key, I think that would be
much less ambiguous then None

Jose

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.  Mike doesn't like positional arguments for SAContext but i
> think they make sense in these cases.  So None was the best compromise
> I could find.
>
> I'm open to changing it to "default" if people like that better.  It
> does mean people would have to pass the exact string or
> sacontext.DEFAULT (which used to exist but currently doesn't).
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to