Giter VIP home page Giter VIP logo

Comments (5)

haipinglu avatar haipinglu commented on May 31, 2024

@sz144 Many thanks. It is great that you bring up this issue. It will be an important change/enhancement so we'd better consult more references to decide what is the best (i.e. modern and professional) approach for us and discuss in a pykale meeting to make a decision and implement.

Since we are aiming for the pytorch ecosystem, we should consult recent libraries there more (e.g. those at the bottom of the contributing guidelines). For example, utils is common for almost all libraries so we could compare how they implement that. We can have some initial discussions when we meet.

from pykale.

haipinglu avatar haipinglu commented on May 31, 2024

@sz144 I've studied further. Wildcard import from ... import * is now considered as a bad practice and we should NOT use it. Therefore, defining __all__ is no longer useful, right?

I know some other code did it but those may be due to historical reasons (older version of python) are now considered as bad practice by modern python, as least according to what I found out. Note that we requires python 3.6+.

from pykale.

haipinglu avatar haipinglu commented on May 31, 2024

@sz144

This is from a card created by @sz144

References:
https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces

https://stackoverflow.com/questions/35727134/module-imports-and-init-py-in-python

This post is from 5 years ago about python 2.7 so it is quite outdated.

Examples:

These packages were build years ago so its practice may not be the best practices for more recent python.

from pykale.

shuo-zhou avatar shuo-zhou commented on May 31, 2024

@sz144 I've studied further. Wildcard import from ... import * is now considered as a bad practice and we should NOT use it. Therefore, defining __all__ is no longer useful, right?

I know some other code did it but those may be due to historical reasons (older version of python) are now considered as bad practice by modern python, as least according to what I found out. Note that we requires python 3.6+.

from ... import * is a bad practice but defining __all__ should still be useful. Let me check more references.

from pykale.

haipinglu avatar haipinglu commented on May 31, 2024

If a convincing reason can be found before the next pykale meeting, we could consider. Otherwise, we need to move on via PR #101.

from pykale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.