On Tue, May 26, 2020 at 12:53 PM Steven D'Aprano <st...@pearwood.info> wrote:
> >>> len(Undef) > TypeError: len() takes exactly one argument (0 given) > > since len takes no default values. But if Undef is considered to be an > actual object, like any other object, we ought to get this: > JavaScript and R, for example, do have a special pseudo-values for "even more missing". In JS, it is null vs undefined. In R, it is... well, actually NULL vs. NA vs. NaN. E.g.: > c(NULL, NA, NaN, 0, "") [1] NA "NaN" "0" "" The NULL is a syntactic placeholder, but it's not a value, even a sentinel (i.e. it doesn't get in the array). Python *could* do that. But it would require very big changes in many corners of the language, for no significant benefit I can see. In other words, I agree with Steven. -- The dead increasingly dominate and strangle both the living and the not-yet born. Vampiric capital and undead corporate persons abuse the lives and control the thoughts of homo faber. Ideas, once born, become abortifacients against new conceptions.
_______________________________________________ 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/2TMKZH3HMWBVQRLDF6WIN5GFENSRAAYG/ Code of Conduct: http://python.org/psf/codeofconduct/