On Tue, 2009-01-20 at 11:19 -0800, Ian wrote: > On Jan 19, 5:20 pm, Malcolm Tredinnick <malc...@pointy-stick.com> > wrote: > > Just to be accurate, PEP 249 says that a paramstyle of "pyformat" is one > > possible value, which would permit the above sort of query. It does not > > say that every conforming database wrapper is required to support it. > > Although the PEP recommends supporting "numeric", "named" or pyformat" > > styles of parameter markers, historically and practically, most database > > wrappers have supported "format", although SQLite (and some other > > databases that don't have backends in Django's core, although the exact > > names escape me now) only supports "qmark". > > > > Since you note later in the thread that you're using SQLite, that is the > > cause of the confusion here. I don't think there's any bug. > > Not quite. SQLite also supports the "named" style. The only barrier > to using that style through the Django cursor wrapper is that the > backend will intercept the query, assume it's written in the "format" > style, and attempt to convert it to "qmark", raising an error when > that fails. I think this is not a bug, but a design question: should > Django support passing query parameters as mappings; if so, should the > backend pass the engine's native style through unchanged, or should we > standardize on "pyformat" (as we have already standardized on "format" > when the parameters are passed as a sequence)? > > We should move this discussion to the developers list or the ticket.
If you want. Personally, I'm struggling to care about it that much. It's simply not a blocker to any real functionality. Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---