> I think that a programming language needs to be different enough from a 
> natural language to remind you that it's a programming language and that 
> the computer isn't that smart. The computer will do as you say, not as 
> you mean.

I agree entirely, that's why I am not suggesting putting spaces and using magic 
keywords or 's, the proposed change is very limited in that regard and is 
focused on making positional arguments be positional. The proposed change in 
behaviour is to ​allow `.` in a function signature declaration/definition:

def foo(arg1).bar(arg2):
    ...
 
foo(0).bar(1) == foo.bar(0,1)

this doesn't look like english at all, but facilitates more language like / 
naturally readable function signatures.

A broader option, that I have seen before but can't find the thread, is to 
allow `.` in a signature as sugar for defining a function as an attribute / in 
the scope of something else i.e.

def foo.function(...):
    ...

is equivalent to

def function(...):
    ... 
foo.function = function

If that were allowed, then it would be possible to sort of get the syntax I am 
talking about.
_______________________________________________
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/ZIJAORKONOOFRN7ZJMUOWY5IER5ZUFHK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to