|Subject:||Fwd: Import/Export everything from a module?|
|Date:||Tue, 24 Mar 2020 21:35:15 +0700|
You should not use unqualified imports.FROM Foo IMPORT Bar, Baz, Bam; (* VERY BAD STYLE *)Use qualified import instead.IMPORT Foo; (* PROPER/CLEAN STYLE *)This way you do not need to import identifiers one by one.This also saves you the hassle of making up longer more specific names.Instead ofFROM StringLib IMPORT stringsAreEqual;IF stringsAreEqual(str1, str2) THEN ...you doIMPORT StringT;IF StringT.equal(str1, str2) THEN ...On Tue, 24 Mar 2020 at 22:27, Hưng Hưng <address@hidden> wrote:I found it's too time consuming to write a long list of import, export. Is there any syntax to import everything from a module? e.g: FROM EXAMPLE IMPORT */ALL/EVERYTHING/... or IMPORT EXAMPLE.*? Python has a syntax like this: from example import *; which I think heavily influenced by M2.I wonder the same thing for Export, too. Thanks.
|[Prev in Thread]||Current Thread||[Next in Thread]|