M
Modular14mo ago
JIMC

Cross-directory Imports

Simply put, how do I import Array defined in src/array/array.mojo from src/vector/vector.mojo?
No description
3 Replies
JIMC
JIMCOP14mo ago
@Jack Clayton do you have any answer for this?
Jack Clayton
Jack Clayton14mo ago
Hi @JIMC you need to have those two as subdirs of a pkg like:
No description
Jack Clayton
Jack Clayton14mo ago
Then in vector.mojo you can:
from ..array import Array
from ..array import Array
Want results from more Discord servers?
Add your server