Zulip Chat Archive

Stream: general

Topic: Is there a way to import only one item from a module


Ben (Jun 09 2025 at 19:04):

I want to use a single function from a module. I don't want the other items to "pollute" the current file system namespace. Is there an import ... only [x] feature?

Asei Inoue (Jun 09 2025 at 22:12):

why don’t use private modifier?

Jireh Loreaux (Jun 09 2025 at 22:15):

If I understand correctly, this is on Sebastian Ullrich's roadmap for this year.

Jz Pan (Jun 10 2025 at 02:49):

Asei Inoue said:

why don’t use private modifier?

But there is from MODULE import FUNC1, FUNC2 in Python...

Michael Rothgang (Jun 10 2025 at 06:29):

There is open Foo (bar) - which brings only the item Foo.bar into scope. (to clarify: this is in Lean)

Ruben Van de Velde (Jun 10 2025 at 06:41):

But this is not python


Last updated: Dec 20 2025 at 21:32 UTC