Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-30 Thread Yanghao Hua
On Thu, May 30, 2019 at 12:56 PM Richard Damon wrote: > As someone who does hardware design with HDLs, I would say that to think > that it would be easy to recreate the abilities of them in a > 'conventional' programming language doesn't really understand at least > one of the languages, as there

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-30 Thread Richard Damon
On 5/30/19 4:09 AM, Yanghao Hua wrote: > On Thu, May 30, 2019 at 12:50 AM Greg Ewing > wrote: >> Steven D'Aprano wrote: >>> Yanghao Hua wants to customise the behaviour of assignment. I believe >>> that he wants to emulate the behaviour of some hardware description >>> languages, where the equals

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-30 Thread Yanghao Hua
On Thu, May 30, 2019 at 7:07 AM Stephen J. Turnbull wrote: > > Steven D'Aprano writes: > > > You might be right, but then the first post in this thread talked > > about it: > > > > I realize there is no way to overload the behavior of the > > assignment operator in python > > > >

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-30 Thread Yanghao Hua
On Thu, May 30, 2019 at 1:02 AM Greg Ewing wrote: > > Steven D'Aprano wrote: > > > The obvious solution to customising assignment is to use a dotted > > target: > > > > obj.x = value > > Another problem with this is that we don't want to customise *all* > assignments. Sometimes we just want a

Re: [Python-ideas] Operator as first class citizens -- like in scala -- or yet another new operator?

2019-05-30 Thread Yanghao Hua
On Thu, May 30, 2019 at 12:50 AM Greg Ewing wrote: > > Steven D'Aprano wrote: > > Yanghao Hua wants to customise the behaviour of assignment. I believe > > that he wants to emulate the behaviour of some hardware description > > languages, where the equals sign = doesn't mean assignment (if I have

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

2019-05-30 Thread Barry Scott
> On 30 May 2019, at 01:49, Steven D'Aprano wrote: > > On Wed, May 29, 2019 at 10:22:31PM +0100, Barry wrote: > >> Serhiy, I think, is conflating two things. >> 1. How to write software robust aginst attack. >> 2. How to replace a symlink atomically. > > I don't have an opinion on whether Se