On Mar 28, 9:57 am, "__wyatt" <[EMAIL PROTECTED]> wrote:
> On Mar 28, 9:05 am, fintan <[EMAIL PROTECTED]> wrote:
>
> <...>
>
> Personally I find the way pylons.database works a little bit less
> explicit than I would like. Another way to create an engine is:
>
>     from pylons.database import create_engine, get_engine_conf
>     engine = create_engine(*get_engine_conf())
>     metadata.connect(engine)

This can be slightly simplified. You don't need to pass
``*get_engine_conf()`` to ``create_engine``. ``create_engine`` will
call ``get_engine_conf`` if no args are passed:

    from pylons.database import create_engine
    engine = create_engine()    # get_engine_conf gets called for you

Anyway, not a big thing, but a little tidier.


__wyatt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to