[DB-SIG] API 3.0 limiting paramstyle to ['named', 'qmark'] is okay. ('format' is not desirable)

Michael Bayer mike_mp at zzzcomputing.com
Fri May 17 18:23:45 CEST 2013


On May 17, 2013, at 12:15 PM, Daniele Varrazzo <daniele.varrazzo at gmail.com> wrote:

> On Fri, May 17, 2013 at 5:07 PM, Michael Bayer <mike_mp at zzzcomputing.com> wrote:
>> 
>> 
>> 
>> IMHO it is explicit, whether you say:
>> 
>> cursor.execute(stmt, { < dictionary>} )
>> 
>> vs.
>> 
>> cursor.execute(stmt, [ <list>] )
>> 
>> the type of parameters passed indicates the style of params to search for.   It's explicit via type inference.    if a dictionary is passed, "?" symbols are left alone.  If a list is passed, ":param" symbols are left alone.  If neither is passed, then neither ? nor :param are searched for.
> 
> This only resolves the ambiguity between positional or mapping
> arguments. It doesn't help a driver to disambiguate between two
> different mapping styles, such as named or pyformat.

the proposal includes that only qmark and named are available.  There would be no pyformat, format, numeric.




More information about the DB-SIG mailing list