Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Make type-checks 'future compatible' by using isinstance #68

Merged
merged 1 commit into from
Mar 31, 2016

Conversation

adrienguerard
Copy link
Contributor

Previously type-checks were done by doing
type(obj) is klass
This doesn't take into account 'future' libs that use object inheritance to
backport new features from 3 to 2 without breaking 2-only libs. Now type-checks
are done using 'isinstance', which is a more relaxed type-check, but also the
desired behavior typically.

Previously type-checks were done by doing
type(obj) is klass
This doesn't take into account 'future' libs that use object inheritance to
backport new features from 3 to 2 without breaking 2-only libs. Now type-checks
are done using 'isinstance', which is a more relaxed type-check, but also the
desired behavior typically.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.78% when pulling d1e8864 on adrienguerard:master into 69cd051 on bmuller:master.

@adrienguerard
Copy link
Contributor Author

@bmuller Let me know once you're merged and pushed up to pypi; afaik same tests pass & run

@bmuller bmuller merged commit 0acf0a0 into bmuller:master Mar 31, 2016
@bmuller
Copy link
Owner

bmuller commented Mar 31, 2016

v1.5 now available on pypi

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

Successfully merging this pull request may close these issues.

3 participants