On Sun, Oct 31, 2021 at 5:25 PM Chris Angelico <[email protected]> wrote:
> I don't think this is a major problem. It's no worse than other things
> you can mess with, and if you do that sort of thing, you get only what
> you asked for; there's no way you can get a segfault or even an
> exception, as long as you use either None or a string.
>
> (I should probably have some validation to make sure that those are
> the only two types in the tuple. Will jot that down as a TODO.)

Since __kwdefaults__ and __kwdefaults_extra__ are mutable dicts,
there's not a lot of point trying to validate them on attribute
assignment. Oh well. Would have been nicer to catch errors earlier.

Not that it makes a huge difference. None is the most significant
value here (it means "that's an early-bound default, even though it's
Ellipsis"), and everything else currently just means "that's a
late-bound default".

ChrisA
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/7XRUIBZGRU6QX4HV46A6M3CJQ553R2GX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to