Skip to content

Commit 344067e

Browse files
authored
Clarify the effect of the global lazy flag
1 parent 095aa17 commit 344067e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

peps/pep-0805.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ Syntax restrictions
231231
The soft keyword is only allowed at the global (module) level, **not** inside
232232
functions, class bodies, or ``try``/``with`` blocks. Import statements that use the soft keyword
233233
are *potentially lazy*. In addition, wild card imports will not be supported for lazy
234-
import semantics by the soft keyword and will instead raise a syntax error.
234+
import semantics by the soft keyword and will instead raise a syntax error. Imports that
235+
can't be lazy are unaffected by the global lazy imports flag, and instead are always eager.
235236

236237
Specifically:
237238

@@ -243,8 +244,6 @@ Specifically:
243244
or ``with`` block. This raises a ``SyntaxError``.
244245

245246
3. **No wild card imports**: ``lazy from module import *`` raises a ``SyntaxError``.
246-
Wild card ("star") imports are always eager, even when the global lazy
247-
imports flag is enabled.
248247

249248
Examples of syntax errors:
250249

0 commit comments

Comments
 (0)