Re: API 3.0 limiting paramstyle to ['named', 'qmark'] is okay. ('format' is not desirable)

Michael Bayer <[email protected]>
Newsgroups gmane.comp.python.db
Message-ID <[email protected]>
On May 17, 2013, at 12:15 PM, Daniele Varrazzo <[email protected]> wrote:

> On Fri, May 17, 2013 at 5:07 PM, Michael Bayer <[email protected]> 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.


_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.