On Fri, 17 Jun 2022 at 13:54, Andrew Jaffe <[email protected]> wrote:
>
> Is there a *reason* why you are leaving this unspecified? To put it more
> baldly, is there any reason (e.g., difficulty of parsing?) why allowing
> these "forward" references should *not* be allowed? It seems that
> "n=>len(items), items=[]" might be an important use case.
Am I right in thinking the key issue here is that => is *not* used for
"items"? So
def frob(n=>len(items), items=[]):
print(n)
items.append(1)
gets very complicated to reason about. What does this print?
frob()
frob()
frob(items=[1,2,3,4,5])
frob(3, [])
frob()
frob(3)
frob()
Even if someone *can* provide an answer, I'd be reluctant to accept
that any answer could be described as "intuitive". And "well, don't do
that" is just ducking the question - in essentially the same way as
"it's implementation defined" does...
Paul
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/XAUNUGXYCCFU2OXUORMKRPHSRQO5HTX3/
Code of Conduct: http://python.org/psf/codeofconduct/