On Sun, 23 Jul 2023 at 12:20, Dom Grigonis <dom.grigo...@gmail.com> wrote:
>
>
> > There is no way to have a value that isn't a value, in Python. The
> > concept doesn't make sense and would break all kinds of things.
> > (That's why, when a special function like __getitem__ has to be able
> > to return literally anything, it signals "nothing to return" by
> > raising an exception.)
>
> I accept that it might be difficult to implement.
> I see that it would break things at cpython.
> Will definitely break some of the stdlib. E.g. inspect stuff.
> It wouldn’t break any of the existing python code.
> So yes, might not be a minor change.
>
> Could it be done nicely and easily by someone with relevant experience? I 
> don’t know.
>
>
> But I fail to see why it doesn’t make sense - that’s a strong statement.
>
> It would be a value, just a value that is treated with exception in this 
> particular case.
> There is definitely code at that level - resolving args, kwargs, dealing with 
> “/" and “*” in relation to arguments provided, etc.
>
> It would take effect only on keyword arguments with defaults, if so then 
> fairly contained matter.
> It could be a default of a keyword argument itself, would have a type and 
> everything as any other object.
>

Okay. You now have an object that you can't do anything with, because
it can't be a function argument. So...

Show me how you would put this value into a dictionary.

Show me how you would find out the type of this value.

Show me how you would refer to this in an exception.

Show me how you would access an attribute of this object.

Show me how you would do ANYTHING WHATSOEVER with this object.

It does not make sense to have an object that isn't an object. And in
Python, every value *is* an object.

ChrisA
_______________________________________________
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 
https://mail.python.org/archives/list/python-ideas@python.org/message/AHM6KHYJRFPLY3QUWV6MNCZ33BWSNR3Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to