Re: [sqlalchemy] Tiny doc clarification request

2018-11-08 Thread Jonathan Vanasco
is the list operation nested?

i.e. the example states: 

   - 
   
   data_table.c.data[('key_1', 'key_2', 5, ..., 'key_n')]
   
   
does that correspond to:

 ['key_1']['key_2']['5']['...']['key_n'] = foo


If so, it might make sense to call the first two "toplevel index 
operations, by key or integer" and the latter "nested path operations".


-- 
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.


Re: [sqlalchemy] Tiny doc clarification request

2018-11-08 Thread Mike Bayer
the two "index" operations apply to two different datatypes, hash and
list, is it having "key' / "integer" both called "index" operations
that is confusing?
On Thu, Nov 8, 2018 at 11:29 AM Lele Gaifax  wrote:
>
> Hi,
>
> in the basic JSON type docstring I see:
>
> The base :class:`.types.JSON` provides these two operations:
>
> * Keyed index operations::
>
> data_table.c.data['some key']
>
> * Integer index operations::
>
> data_table.c.data[3]
>
> * Path index operations::
>
> data_table.c.data[('key_1', 'key_2', 5, ..., 'key_n')]
>
> and I was about to open a PR with a solution, but a doubt chimed in.
>
> Does it mean something like the following:
>
> The base :class:`.types.JSON` provides these two operations:
>
> * Keyed index operations, either by string as in
>
>   ::
>
> data_table.c.data['some key']
>
>   or positional/by integer::
>
> data_table.c.data[3]
>
> * Path index operations::
>
> data_table.c.data[('key_1', 'key_2', 5, ..., 'key_n')]
>
> or is it just a s/two operations/three operations/ ?
>
> Thanks, lele.
> --
> nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
> real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
> l...@metapensiero.it  | -- Fortunato Depero, 1929.
>
> --
> 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.

-- 
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.


[sqlalchemy] Tiny doc clarification request

2018-11-08 Thread Lele Gaifax
Hi,

in the basic JSON type docstring I see:

The base :class:`.types.JSON` provides these two operations:

* Keyed index operations::

data_table.c.data['some key']

* Integer index operations::

data_table.c.data[3]

* Path index operations::

data_table.c.data[('key_1', 'key_2', 5, ..., 'key_n')]

and I was about to open a PR with a solution, but a doubt chimed in.

Does it mean something like the following:

The base :class:`.types.JSON` provides these two operations:

* Keyed index operations, either by string as in

  ::

data_table.c.data['some key']

  or positional/by integer::

data_table.c.data[3]

* Path index operations::

data_table.c.data[('key_1', 'key_2', 5, ..., 'key_n')]

or is it just a s/two operations/three operations/ ?

Thanks, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.

-- 
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.