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

Made Smarties class derive from object to get it to work with pickles in python2 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

telmop
Copy link

@telmop telmop commented Apr 10, 2018

In python2, old-style classes (those not derived from object) don't have __new__(). This causes an error when loading a Smarties object from a pickle:
AttributeError: class Smarties has no attribute '__new__'

By making Smarties inherit from object, this problem is solved.

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.

1 participant