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 11:50 AM, Daniele Varrazzo <[email protected]> wrote:

> 
> If that's too provocative I think the Python dbapi should mandate the
> %s and %(name)s formats because they are the only ones to have well
> defined syntax and escaping rule and are well known to every python
> developer.

I forgot also, not to mention that Python itself is moving away from "%" as a formatting operator, in favor of the newer .format() method which has yet *another* syntax: see pep 3101: 

http://www.python.org/dev/peps/pep-3101/

http://docs.python.org/3/library/string.html#formatspec

I love the format and pyformat styles a lot for Python programming but I feel like they cause a lot of confusion when they are additionally interpreted by a DBAPI.  It runs you into various "double-escaping" types of situations.


_______________________________________________
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.