You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bindings for cursor.execute/executemany can conceptually either be a dictionary (lookup by key) or a sequence (lookup by position).
Currently PyDict_Check is used to determine if it is a dictionary, otherwise PySequence_Fast is used for positional access.
Because PyDict_Check only looks for dict subclasses, it means that UserDict won't work. The apparent solution of PyMapping_Check returns True for UserDict, but also for lists and tuples.
Bindings for cursor.execute/executemany can conceptually either be a dictionary (lookup by key) or a sequence (lookup by position).
Currently PyDict_Check is used to determine if it is a dictionary, otherwise PySequence_Fast is used for positional access.
Because PyDict_Check only looks for dict subclasses, it means that UserDict won't work. The apparent solution of PyMapping_Check returns True for UserDict, but also for lists and tuples.
For reference, this is what the builtin _sqlite3 module does
Treat as not a dictionary if:
Otherwise treat as dictionary if:
Otherwise error
The text was updated successfully, but these errors were encountered: