On 5/05/22 3:53 am, [email protected] 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 -- [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/XVIL7YLN66CLJKQWBRDB7NYQCRHP7JWF/ Code of Conduct: http://python.org/psf/codeofconduct/
