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

package name #2

Open
fariza opened this issue Jun 11, 2015 · 2 comments
Open

package name #2

fariza opened this issue Jun 11, 2015 · 2 comments

Comments

@fariza
Copy link

fariza commented Jun 11, 2015

Hi again
The name of the package is a little bit too common.
Many people have local packages or functions inside packages named data if possible I would recommend to change it to something else. Myself I had to rename my own package

@mbr
Copy link
Owner

mbr commented Jun 11, 2015

You can fix namespace clashes with relative vs absolute imports.

Assuming your own package is named data:

import data            # will import the globally installed package
from . import data  # will import the local data

This behaviour is also the default since Python 3.0, you can get the same via from __future__ import absolute_imports on Python 2.x.

Other than that I consider PyPI the definite namespaces =).

@fariza
Copy link
Author

fariza commented Jun 11, 2015

yes, but in general you don't expect that kind of things. It was just a suggestion

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