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

Consistently use new-style classes #267

Closed
wants to merge 2 commits into from

Conversation

dkellner
Copy link
Contributor

We should use new-style classes wherever possible. There were still four classes not inheriting object which will lead to confusion when subclassing them (and probably more subtle issues). For example right now you can use super in a subclass of Validator, but not in a subclass of BasicErrorHandler.

@funkyfuture
Copy link
Member

ah, yeah. coming from Python 3 i missed this. is it also a good practice for mixin classes?

@dkellner
Copy link
Contributor Author

I think so, otherwise you will be mixing old-style and new-style classes. And as far as i know in Python 3 all classes behave like new-style classes which is another good reason for doing this, so we don't have different behaviour in Python 2.

@nicolaiarocci nicolaiarocci modified the milestone: Unreleased Sep 16, 2016
nicolaiarocci added a commit that referenced this pull request Sep 21, 2016
@nicolaiarocci
Copy link
Member

Merged with bacce0a

Thanks!

@dkellner dkellner deleted the newstyle-classes branch September 22, 2016 22:10
funkyfuture pushed a commit to funkyfuture/cerberus that referenced this pull request Oct 26, 2016
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.

None yet

3 participants