Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove attributedict, confusing and offers no benefit #74

Merged
merged 3 commits into from
May 10, 2022

Conversation

davidbloss
Copy link
Member

AttributeDict from ats/attributedict.py is a thin wrapper around a plain dictionary. The only "feature" it provides is allowing devs to update its contents like this: my_dict.new_thing = "fancy" in addition to the standard my_dict["new_thing"] = "fancy" approach that contains no surprises.

For this "extra" behavior we would want to use a @property within a class to facilitate some additional work. But given that no extra work is done when updating contents of an AttributeDict it seems more appropriate to simply call it what it is, a dictionary.

This also greatly improves readability and will allow for an easier update to ATS when integrating Flux into its core.

@davidbloss davidbloss requested a review from dawson6 May 10, 2022 15:30
@davidbloss davidbloss merged commit 0157d04 into main May 10, 2022
@davidbloss davidbloss deleted the feature/bloss1/remove_attributedict branch May 10, 2022 16:22
Copy link
Member

@white238 white238 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the little it is worth, I approve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants