1) How frequently do people write (some version of) this function?
I think it is pretty frequent to check that a variable is not None before 
accessing it's attributes or element.
1a) Can all variants of the function be cleanly provided by a single
stdlib function?
2 functions can reasonably cover the main use cases: access hierarchy with a 
sequence of keys and access hierarchy with string of keys. I think this could 
be a package which can extended with various other helper function like 
getlistpath which could gather the leaves from a tree like hierarchy.
2) Does the feature have subtleties that are easy to get wrong, and
thus people write buggy versions of it without realising it?
I think, no.
3) Does the lack of the feature cause code to be significantly less readable?
Yes, this can save several lines of code.
4) Is code less secure and/or does it suffer from encapsulation
breakage when this is done manually? (See, for instance, f-strings vs
.format_map().)
Yes, error handling is often omitted.

I feel this functionality has a bit of chicken & egg problem: if these 
functions would be available in stdlib, people would use it; but as they do not 
provide such a complex functionality which would make programmers start to look 
for such a library on pypi.
_______________________________________________
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/QY6NW7UUYHKP65HSUAZSOUDZZKGCBA6S/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to