On 11/3/21 2:31 PM, Chris Angelico wrote:
> On Thu, Nov 4, 2021 at 5:54 AM Ethan Furman wrote:
>> On 11/3/21 12:13 AM, Chris Angelico wrote:

>>> Python has a strong policy of evaluating things immediately, or being
>>> very clear about when they will be evaluated
>>
>> Putting the marker in the middle of the name binding expression is not "very 
clear" -- particularly
>> since the advice is "no spaces around '=' in function headers and calls".

[typo above fixed: 'ne' -> 'no'

> Not sure what you mean,

I mean the same thing that D'Aprano has reiterated several times:

  def do_something_fun(target:Any, action:int=-1, permissions:int=>target.perm):
      pass

vs

  def do_something_fun(target:Any, action:int=-1, @permissions:int=target.perm):
      pass

Having the `@` in front instead of buried in the middle is clear, and just like the * and ** in `*args` and `**kwds` signals that those are different types of variables, the @ in `@permissions` signals that `permissions` is a different kind of variable -- and yes, the fact that it is late-bound does make it different; to claim otherwise is akin to claiming that `args` and `kwds` aren't different because in the end they are just names bound to objects.


> [snip javascript example]

Is your javascript example trying to show that putting the sigil in front is nonsensical? If no, then what? If yes, then it is plain that you and I simply disagree and neither of us is going to convince the other.

--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/2KPVUNE3SMDOKH2J37NHKB6PWPYUQTQP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to