Feature suggestion: "Using declarations" i.e. context managers ("with" blocks) tied to scope/lifetime of the variable rather than to nesting

2019-02-21 Thread mnl.p...@gmail.com
(I sent this a few days ago but got bounced without a reason—don’t see it posted, so I’m trying one more time.) I thought this new C# feature would be a good thing to add to Python: https://vcsjones.com/2019/01/30/csharp-8-using-declarations/ The nesting required by context managers can be at od

Feature suggestions: "Using declarations" i.e. context managers ("with" blocks) tied to scope/lifetime of the variable rather than to nesting

2019-02-19 Thread mnl.p...@gmail.com
I thought this new C# feature would be a good thing to add to Python: https://vcsjones.com/2019/01/30/csharp-8-using-declarations/ I find the nesting required by context managers to be at odds with the broad intent. The code indentation in python should reflect the program logic and flow as much