Mercurial > cpython-lru_cache-weakref
comparison Python/thread_pthread.h @ 15830:e00f718e4d8a legacy-trunk
Two changes to from...import:
1) "from M import X" now works even if M is not a real module; it's
basically a getattr() operation with AttributeError exceptions
changed into ImportError.
2) "from M import *" now looks for M.__all__ to decide which names to
import; if M.__all__ doesn't exist, it uses M.__dict__.keys() but
filters out names starting with '_' as before. Whether or not
__all__ exists, there's no restriction on the type of M.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 12 Jan 2001 16:24:03 +0000 |
| parents | 6f6f965c5e2d |
| children | 2a785b668a16 11a758c56027 |
comparison
equal
deleted
inserted
replaced
| 15829:9308dc8c85e0 | 15830:e00f718e4d8a |
|---|
