On Thu, Dec 10, 2020 at 11:10:05PM +0200, Serhiy Storchaka wrote:
> > There are other ways you can get this same effect. Should we have
> > warnings for them all?
> >
> > import spam
> > ImportWarning: spam.py is a hard link to eggs.py and we
> > want to force you to read the docs to
On Sat, Dec 12, 2020 at 11:42 AM Jonathan Crall wrote:
>
> I'm not sure if this has been asked / suggested before.
>
> I'm wondering if there is any interest in conditional or loop-based `with`
> statements. I think it could be done without a syntax change.
>
> ### Napkin proposal
>
> Context man
I'm not sure if this has been asked / suggested before.
I'm wondering if there is any interest in conditional or loop-based `with`
statements. I think it could be done without a syntax change.
### Napkin proposal
Context managers could define `__if__` or `__for__`, and if those dunder
methods we
On Thu, Dec 10, 2020 at 8:03 PM Chris Angelico wrote:
> > Here is an example of how I use it to build an arbitrary long SQL
> request without having to pay for long intermediate strings, both in
> computation on memory.
>
> > I often had such cases, but ended up using the more costy str.join .