> What happens when aliases collide with proper attributes? Could you have > an attribute 'foo', combined with an attribute 'bar' with alias 'foo'? If > so, how would that work? >
Using a ChainMap makes this choice for us. The first level dictionary-- which would contain the attribute with the name collision-- wins. > > What happens when a subclass of Foo adds an attribute that masks an alias > defined for an attribute of Foo? > Again, the child attribute wins because ChainMap.
_______________________________________________ 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/FYT3AYJOTXSFS5YZ7IJ5EJIO2F4CCKOR/ Code of Conduct: http://python.org/psf/codeofconduct/