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

Consistency on modifying attributes #75

Open
moorepants opened this issue Apr 29, 2014 · 0 comments
Open

Consistency on modifying attributes #75

moorepants opened this issue Apr 29, 2014 · 0 comments

Comments

@moorepants
Copy link
Member

Right now the classes have a weird combination of modifying attributes of the object in-place and methods that don't modifying attributes but return the results, of which other methods use to modify attributes.

This inconsistency is tied around thinking about object immutability. Some objects work nicely as immutable, i.e. their methods always return a new modified object. But mutable objects let you modify the object in place.

pandas data frames are not immutable, you can change the underyling data, but it seems like most of their methods return a new data frame as opposed to modifying it in place. So it is a combination. I'm really not sure what the best OO design paradigm is for this stuff.

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

No branches or pull requests

1 participant