On Thu, Dec 1, 2022, at 1:01 PM, Lele Gaifax wrote:
> "Mike Bayer" <mike...@zzzcomputing.com> writes:
> 
> > On Wed, Nov 30, 2022, at 2:31 PM, Lele Gaifax wrote:
> >> "Mike Bayer" <mike...@zzzcomputing.com> writes:
> >> 
> >> > On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote:
> >> >> 
> >> >> - "empty" vs "isempty": both asyncpg and psycopg have a "isempty"
> >> >>   property, we could either rename the "empty" attribute or add an
> >> >>   property alias
> >> >
> >> > great, we can add those.
> 
> 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 ?  


> 
> >> 
> >> Yes, it could be done that way too, but from the developer perspective,
> >> how is he going to create Range instances? Changing the constructor to
> >> require a "type" argument seems uglier than using a specific class.
> >
> > well we could add functions to create Range objects with different
> > types, or maybe class constructors like Range.new_daterange(x, y). We
> > already have a class hierarchy with AbstractRange, I dont want to make
> > *two* class hierarchies, that increases complexity and additionally
> > none of the DBAPIs have type-specific range objects.
> 
> Agree, I'm slightly inclined toward class constructors (less symbols to
> import here and there). Also, "new_date_range()" seems clearer...

great!

> 
> Thanks&bye, 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 
> <mailto:sqlalchemy%2bunsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/87h6yfover.fsf%40metapensiero.it.
> 

-- 
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/e517788b-944d-4aff-81ad-2e9a54b32533%40app.fastmail.com.

Reply via email to