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 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