On Thursday, November 8, 2018 at 12:45:57 PM UTC-5, Lele Gaifax wrote:
>
> But maybe I'm missing some detail on the "engine specific" 
> implementations, 
> where, say, "foo['string']" may be considered a very different operation 
> than 
> "bar[2]"... 
>

Well that also has to do with whatever the object is

  foo = {'string': value}



vs

      bar = [1,2,3,4,5]



if you had in Python:

   foo = {'string': None, 2: 'two'}



it should encode to json where the key is a string:

    '{"2": "two", "string": null}'


With that being stated, I have no idea what happens in SqlAlchemy or the 
various engines if you try to set `bar[2] = "two"'` when `bar` is a 
hash/dict/object.  something might raise an error, or `2` might be retyped 
into the string `"2"`,  or a database might possibly support an int as an 
object key (I have no idea if any of these happen, just rambling on 
potential compatibility points).

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to