[DB-SIG] Some obscurity with paramstyle

Christoph Zwerschke cito at online.de
Sat Jul 16 21:20:20 CEST 2011

At the PyGreSQL mailing list we're currently wondering whether the 
'format' and 'pyformat' paramstyles allow specifying parameters with 
types other than '%s' - e.g. can I specify my parameter as '%.2f' or 
'%(name).2f' if I want to round floats to 2 digits?

PEP 249 has only '%s' in the example, but does not exclude other types,
does this mean these are allowed?

Also, should we define a new paramstyle for the advanced string 
formatting syntax available since Py 2.6?

-- Christoph

More information about the DB-SIG mailing list