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 __slots__ from user-facing modules. #164

Merged
merged 1 commit into from
Jun 16, 2015
Merged

Conversation

mossblaser
Copy link
Member

The major motivation for this change is that in Python 2 you cannot pickle
objects with __slots__ in the general case. This is problematic if you wish to
dump place/route artefacts, e.g. for the purposes of plotting.

Since I don't believe we're currently memory-bound adding __slots__ probably
isn't very useful and so removing this seems like a good idea.

The major motivation for this change is that in Python 2 you cannot pickle
objects with __slots__ in the general case. This is problematic if you wish to
dump place/route artefacts, e.g. for the purposes of plotting.

Since I don't believe we're currently memory-bound adding __slots__ probaly
isn't very useful and so remvoing this seems like a good idea.
@mundya
Copy link
Member

mundya commented Jun 16, 2015

LGTM, but is there a reason you'd rather not add the appropriate magic methods? I can see there being a lot of nets and using less memory there still seems like a good idea.

@mossblaser
Copy link
Member Author

I'd err on the side of "premature optimisation is bad" since if they dominate performance, we're seriously winning (and who wants to test magic methods?).

@mundya
Copy link
Member

mundya commented Jun 16, 2015

I agree that premature optimisation is bad. I guess we can always throw things back in. Feel free to merge.

mossblaser added a commit that referenced this pull request Jun 16, 2015
Remove __slots__ from user-facing modules.
@mossblaser mossblaser merged commit 9351623 into master Jun 16, 2015
@mossblaser mossblaser deleted the remove-slots branch June 16, 2015 12:02
@mundya
Copy link
Member

mundya commented Jun 16, 2015

Please bump + release :)

mundya added a commit to project-rig/nengo_spinnaker that referenced this pull request Jun 16, 2015
As per project-rig/rig#164. This should remove pickling related issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants