If you are using __all__ to define your API, then you'll end up needing
`from foo import *` if you want to combine modules, e.g.:
https://github.com/python/cpython/blob/master/Lib/asyncio/__init__.py
So the two need to coexist. *-import does have valid uses. The majority of
these cases are within
Hi Ethan,
I'm sorry, I take that back, that convention was codified in PEP8.
https://www.python.org/dev/peps/pep-0008/#id50
Best,
George
On Wed, Mar 3, 2021 at 10:18 PM George Harding <
george.winton.hard...@gmail.com> wrote:
> Hi Ethan,
>
> I'm not convinced that _
wrote:
> On 3/3/21 12:55 PM, George Harding wrote:
>
> > Python has an __all__ variable that can be defined in a module to
> restrict
> > which members of the module should be included in a call `from foo
> import *`.
>
> The primary purpose these days for `__all__`
.
Best,
George Harding
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org
-- Forwarded message -
From: Anthony Farino
Date: Wed, Mar 3, 2021 at 5:52 PM
Subject: [Python-Dev] Suggestion About Python Syntax
To:
I love the Python scripting language, but there’s something that would make
it much better. Almost every other programming language uses curly b
less awkward is:
some_iter = map(lambda x: x if print(x) else x, some_iter)
The tuple has a ~50% overhead, the case statement ~15%, compared to the
generator.
I think that the less awkward syntax solves the problem fine (if you can
come up with it). I like that it's explicit rather than requirin