Postgresql does use isempty for the function that test if a range is empty 
https://www.postgresql.org/docs/current/functions-range.html#RANGE-OPERATORS-TABLE

On Thursday, 1 December 2022 at 22:50:11 UTC+1 leleg...@gmail.com wrote:

> "Mike Bayer" <mik...@zzzcomputing.com> writes:
>
> > On Thu, Dec 1, 2022, at 1:01 PM, Lele Gaifax wrote:
> >> Wrt "empty", what's your preference, leaving it as is and expose a
> >> "isempty" property or rename the attribute to "isempty" (and possibly)
> >> add a backward compat "empty" property?
> >
> > well ".isempty" is not the kind of naming convention we like to use
> > these days, so that should likely be an alias. ".empty" might be
> > named ".is_empty". Did I get ".empty" from asyncpg's API ?
>
> I agree with "is_empty", but both asyncpg:
>
> https://github.com/MagicStack/asyncpg/blob/master/asyncpg/types.py#L85
>
> and psycopg:
>
>
> https://github.com/psycopg/psycopg/blob/master/psycopg/psycopg/types/range.py#L108
>
> and psycopg2:
>
> https://github.com/psycopg/psycopg2/blob/master/lib/_range.py#L89
>
> call it "isempty", as a @property.
>
> While asyncpg has an "internal" "_empty" attribute, psycopg chose to
> set "_bounds" to None carry that information.
>
> ciao, lele.
> -- 
> nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
> real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
> le...@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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/42cfda26-49ab-4930-b322-e1e2a72b8e5en%40googlegroups.com.

Reply via email to