[Python-ideas] Re: Enhancing variable scope control

2022-12-02 Thread Anony Mous
These objections -- such as they are -- are all applicable to every instance of "I wrote a function" or even "I named a variable" in any particular namespace: not just within imports, either. Anywhere. Global context. Sub functions. etc. Collisions, etc... not a big deal. Change a name. It'll stil

[Python-ideas] Re: Enhancing variable scope control

2022-12-02 Thread Chris Angelico
On Fri, 2 Dec 2022 at 21:49, Anony Mous wrote: > Or... like these non-Python Ruby people that keep mysteriously polluting the > argument - just tell the team "we're not going to do that." Again, problem > solved. You do *not* have to cripple a language to resolve this in any > particular direct

[Python-ideas] Re: Enhancing variable scope control

2022-12-02 Thread Steven D'Aprano
On Fri, Dec 02, 2022 at 03:48:36AM -0700, Anony Mous wrote: > These objections -- such as they are -- are all applicable to every > instance of "I wrote a function" or even "I named a variable" in any > particular namespace: not just within imports, either. Anywhere. Global > context. Sub functions

[Python-ideas] Re: Enhancing variable scope control

2022-12-02 Thread Stephen J. Turnbull
Anony Mous writes: > You want > You want > You want You can't always get what you want But if you try some time You might find You get what you need. Batteries included![tm] Jagger and Richards evidently knew a lot about language design. ;-) > It works very well, does exactly what I wanted,

[Python-ideas] Re: Enhancing variable scope control

2022-12-02 Thread Brendan Barnwell
On 2022-12-02 02:48, Anony Mous wrote: Obviously if you were to say "extend library with X", and X was already present (remember, these are immutable), such an attempt would fail. Bang. Exception. The very first time you tried it. Therefore, you're already directly on the path of "going to need