This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sgala
Recipients ghaering, sgala
Date 2010-03-23.01:27:59
SpamBayes Score 7.5605094e-05
Marked as misclassified No
Message-id <1269307682.02.0.635211623726.issue8196@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think they are equally clear, at least from the point of view of the code written towards the API. I think that

execute("UPDATE authors set name = ?, email = ?, comment = ? WHERE id = ?", (form.name, form.email, form.text, form.id))

is way less clear, more verbose, and prone to alignment errors, than

execute("UPDATE authors set name = :name, email = :email, comment = :text WHERE id = :id", form)

I think this is the reason why the PEP writer prefer named style and. I was about to recode an example using a dictionary for cleaner code, when I noticed the bug. Now I need to hardcode that sqlite3 supports 'named' style, even if paramstyle says other thing, or to dynamically test, in case they decide to remove support for the next release. Both are ugly alternatives.
History
Date User Action Args
2010-03-23 01:28:02sgalasetrecipients: + sgala, ghaering
2010-03-23 01:28:02sgalasetmessageid: <1269307682.02.0.635211623726.issue8196@psf.upfronthosting.co.za>
2010-03-23 01:28:01sgalalinkissue8196 messages
2010-03-23 01:27:59sgalacreate