"Mike Bayer" <mike...@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.
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/87cz92pzei.fsf%40metapensiero.it.

Reply via email to