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

imports on the JSON module the other way around #11

Closed
brunobord opened this issue Aug 27, 2013 · 1 comment
Closed

imports on the JSON module the other way around #11

brunobord opened this issue Aug 27, 2013 · 1 comment

Comments

@brunobord
Copy link

Things look a bit strange at:

https://github.com/dsc/bunch/blob/master/bunch/__init__.py#L286-L290

I think the imports should be the other way around:

  • try to import simplejson as json
  • if it succeeds, you're fine
  • if it fails, you'll fallback to the stdlib module json, which should be available on your Python install.
@dsc
Copy link
Owner

dsc commented Sep 17, 2024

The point was to accommodate versions of python that didn't ship with json. In 2.6, the simplejson library was adopted as json -- the project still has compat back to 2.2.

@dsc dsc closed this as completed Sep 17, 2024
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

2 participants