I’m with Steven.
On Fri, Oct 29, 2021 at 06:22 Chris Angelico wrote:
> On Fri, Oct 29, 2021 at 11:52 PM Steven D'Aprano
> wrote:
> > > Except that that's still backward-incompatible, since None is a very
> > > common value.
> >
> > How is it backwards incompatible? Any tool that looks at
On 2021-10-25 5:32 a.m., Jeremiah Vivian wrote:
For quick checking if a `Movement` object is inside of an iterable.
It seems the core of your problem is that you took the mechanism that's
supposed to tell you if two objects are identical for another purpose,
and now are complaining that you
On Fri, Oct 29, 2021 at 11:52 PM Steven D'Aprano wrote:
> > Except that that's still backward-incompatible, since None is a very
> > common value.
>
> How is it backwards incompatible? Any tool that looks at __defaults__
> finds *exactly* what was there before: a tuple of default values, not a
>
On Fri, Oct 29, 2021 at 10:22:43PM +1100, Chris Angelico wrote:
> > Pardon me if this has already been discussed, but wouldn't it be better
> > to leave defaults and kwdefaults alone, and add a new pair of attributes
> > for late bound defaults? `__late_defaults__` and `__late_kwdefaults__`.
>
>
On Fri, Oct 29, 2021 at 8:11 PM Steven D'Aprano wrote:
>
> On Fri, Oct 29, 2021 at 07:17:05PM +1100, Chris Angelico wrote:
>
> > * Argument defaults (either in __defaults__ or __kwdefaults__) are now
> > tuples of (desc, value) or (desc,) for early-bound and late-bound
> > respectively
> > *
On Fri, Oct 29, 2021 at 11:22:29AM +0200, Gerrit Holl wrote:
> On Fri, 29 Oct 2021 at 11:10, Steven D'Aprano wrote:
> > Obviously you need a way to indicate that a value in __defaults__ should
> > be skipped. Here's just a sketch. Given:
> >
> > def func(a='alpha', b='beta', @c=expression,
On Fri, 29 Oct 2021 at 11:10, Steven D'Aprano wrote:
> Obviously you need a way to indicate that a value in __defaults__ should
> be skipped. Here's just a sketch. Given:
>
> def func(a='alpha', b='beta', @c=expression, d=None)
>
> where only c is late bound, you could have:
>
>
On Fri, Oct 29, 2021 at 07:17:05PM +1100, Chris Angelico wrote:
> * Argument defaults (either in __defaults__ or __kwdefaults__) are now
> tuples of (desc, value) or (desc,) for early-bound and late-bound
> respectively
> * Early-bound defaults get mapped as normal. Late-bound defaults are
> left
https://github.com/Rosuav/cpython/tree/pep-671
So uhh... anyone who knows about the internals of CPython and wants to
join me on this, I would *really* appreciate coauthors!
The implementation ended up a lot more invasive than I originally
planned. Some of that is inherent to the problem, but