On Fri, 24 Jun 2022 at 13:26, Joao S. O. Bueno wrote:
>
>
>
> On Thu, Jun 23, 2022 at 2:53 AM Chris Angelico wrote:
>>
>> On Thu, 23 Jun 2022 at 11:35, Joao S. O. Bueno wrote:
>> >
>> > Martin Di Paola wrote:
>> > > Three cases: Dask/PySpark, Django's ORM and selectq. All of them
>> > >
On Thu, Jun 23, 2022 at 2:53 AM Chris Angelico wrote:
> On Thu, 23 Jun 2022 at 11:35, Joao S. O. Bueno
> wrote:
> >
> > Martin Di Paola wrote:
> > > Three cases: Dask/PySpark, Django's ORM and selectq. All of them
> > > implement deferred expressions but all of them "compute" them in very
> > >
This is what attrs' converter functionality is, right?
https://www.attrs.org/en/stable/init.html#converters
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
Sorry for typos.
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
Dexter Hill wrote:
> The idea is to have a `default_factory` like argument (either in the `field`
> function, or a new function entirely) that takes a function as an argument,
> and that function, with the value provided by `__init__`, is called and the
> return value is used as the value for
> On 23 Jun 2022, at 08:27, Stephen J. Turnbull
> wrote:
>
> Barry Scott writes:
>
>> I can think of ways to implement evaluation-on-reference, but they
>> all have the effect of making python slower.
>
> Probably.
>
>> The simple
>>
>>a = b
>>
>> will need to slow down so that the
Interesting point, it's not something I thought of. One solution as mentioned
by Simão, and what I had in mind, is to pull the type from the first parameter
of the function. We know that the function is always going to have minumum 1
parameter, and the value is always passed as the first
On 2022-06-23 00:03:03, Paul Bryan wrote:
> What type hint will be exposed for the __init__ parameter? Clearly,
> it's not a `str` type in your example; you're passing it an `int` value
> in your example. Presumably to overcome this, you'd need yet another
> `field` function parameter to provide
Barry Scott writes:
> I can think of ways to implement evaluation-on-reference, but they
> all have the effect of making python slower.
Probably.
> The simple
>
> a = b
>
> will need to slow down so that the object in b can checked to see
> if it need evaluating.
No, it doesn't.
What type hint will be exposed for the __init__ parameter? Clearly,
it's not a `str` type in your example; you're passing it an `int` value
in your example. Presumably to overcome this, you'd need yet another
`field` function parameter to provide the type hint for the `__init__`
param?
On Wed,
10 matches
Mail list logo