DEV Community

Discussion on: Where should I put this?😕

Collapse
 
codemouse92 profile image
Jason C. McDonald

Ergo, the preceding suggestion. You still don't want to put implementation in __init__.py if you can at all help it.

Thread Thread
 
pybash profile image
PyBash

Hmm, I also don't want to, but I want the function to be accessible much easier, you see?

Thread Thread
 
codemouse92 profile image
Jason C. McDonald • Edited

That's why I suggested what I did. By following the technique I outlined, you can access the function from just mylib instead of mylib.maths. Read my initial comment again carefully.

Thread Thread
 
pybash profile image
PyBash

Yep, your 1st comment explains it... I will try that, it looks good to me. But again, I have to see what others, comment, right?