On 5/05/22 3:53 am, gabor.g...@proinbox.com wrote:
I think it is pretty frequent to check that a variable is not None before 
accessing it's attributes or element.

While that's probably true, in my experience I'm usually performing
the test once on a particular object and then accessing a bunch
of attributes. I'm not doing it for individual attribute accesses.

Also I don't find that I'm doing deeply nested sequences of
accesses very often. It gives me the feeling that I'm mixing up
levels of abstraction in my code in a way that's going to cause
problems later.

--
Greg

_______________________________________________
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/XVIL7YLN66CLJKQWBRDB7NYQCRHP7JWF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to