[Python-ideas] Re: `if-unless` expressions in Python

2019-06-25 Thread Rhodri James
On 24/06/2019 20:50, Jonathan Fine wrote: I'm concerned that in this thread, and elsewhere, we're not paying sufficient attention to https://en.wikipedia.org/wiki/Cognitive_load. I was under the impression that most of the counter-arguments could be rephrased as "this increases cognitive load

[Python-ideas] Re: Implement POSIX ln via shutil.link and shutil.symlink

2019-06-25 Thread Serhiy Storchaka
04.06.19 10:25, Inada Naoki пише: On Sat, Jun 1, 2019 at 4:10 PM Serhiy Storchaka wrote: Why do you need to replace a symlink atomically? This is a solution, what problem it solves? There is another, more common / realistic usage of atomic symlink replacing. When deploy PHP application or

[Python-ideas] A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala

2019-06-25 Thread nate lust
This message is related to two previous threads, but was a sufficiently evolved to warrant a new topic. I am proposing that two new magic methods be added to python that will control assignment and loading of class instances. This means that if an instance is bound to a variable name, any attempts

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread Ben Rudiak-Gould
On Tue, Jun 25, 2019 at 2:11 PM nate lust wrote: >if an instance is bound to a variable name, any attempts to rebind that name >will result in a call to the __setself__ (name negotiable) of the instance >already bound to that name. I am very, very strongly opposed to this. It would mean that I

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread Juancarlo Añez
Nate, I find this mightily interesting! I think it's worth discussing at length. Is there any chance you'll want to move the discussion to the richer context here? https://discuss.python.org/c/ideas Regards, On Tue, Jun 25, 2019 at 5:00 PM nate lust wrote: > This message is related to two pre

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread nate lust
I am happy to move this discussion to where ever is appropriate. I won't get to it in the next few hours (bed time for my kid) so if you would like feel free to move discussion there, and I guess I can watch this email thread for if you do. Otherwise I will do it when I am free. Nate On Tue, Jun 2

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread Andrew Barnert via Python-ideas
On Jun 25, 2019, at 14:00, nate lust wrote: > > This message is related to two previous threads, but was a sufficiently > evolved to warrant a new topic. > > I am proposing that two new magic methods be added to python that will > control assignment and loading of class > instances. This means

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread nate lust
I tried to address most of the above in the more detailed write-up I linked to. I didn't want to spam out a message that was too long, and the link provided a good way to get syntax highlighting etc. The code that is available in the linked github repository now treats lookups and sets in fastloca

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread nate lust
I created a discussion topic located here https://discuss.python.org/t/a-proposal-and-implementation-to-add-assignment-and-load-overloading/1905 On Tue, Jun 25, 2019 at 6:41 PM nate lust wrote: > I am happy to move this discussion to where ever is appropriate. I won't > get to it in the next few

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread Steven D'Aprano
On Tue, Jun 25, 2019 at 06:35:48PM -0400, Juancarlo Añez wrote: > Is there any chance you'll want to move the discussion to the richer > context here? https://discuss.python.org/c/ideas Please don't. -- Steven ___ Python-ideas mailing list -- python-

[Python-ideas] Re: A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in s

2019-06-25 Thread nate lust
Steven, I apologize I was unaware that this was not the best suggestion, and had already created a topic. I can close it out if that would be best. On Tue, Jun 25, 2019 at 10:25 PM Steven D'Aprano wrote: > On Tue, Jun 25, 2019 at 06:35:48PM -0400, Juancarlo Añez wrote: > > > Is there any chance

[Python-ideas] Re: `if-unless` expressions in Python

2019-06-25 Thread Steven D'Aprano
On Mon, Jun 24, 2019 at 12:37:48PM -0700, Andrew Barnert wrote: > Since you bring up “feeble mail clients”: > > Good mail clients can be configured to collapse and expand quotes, and > to automatically start long nested quotes collapsed. Indeed you are correct, and my own mail client supports

[Python-ideas] Re: `if-unless` expressions in Python

2019-06-25 Thread Jonathan Goble
*de-lurks* On Wed, Jun 26, 2019 at 1:21 AM Steven D'Aprano wrote: > > On Mon, Jun 24, 2019 at 12:37:48PM -0700, Andrew Barnert wrote: > > > And the one-time hassle of figuring out how to configure your MUA, or > > even switching to a better one > > "Better" is subjective, and just because a clien

[Python-ideas] A proposal (and implementation) to add assignment and LOAD overloading (was: (Re: Re: Overloading assignment concrete proposal (Re: Re: Operator as first class citizens -- like in scala

2019-06-25 Thread Stephen J. Turnbull
nate lust writes: > On first read, that may be surprising, but it extends a behavior > pattern that already exists for things like properties (and > generically descriptors) to object instances themselves. I don't think that's a correct interpretation. In all cases of assignment, a name is re