Jonathan Fine writes: > >From my phone. > > An important thing about def x and class A is that the strings x and A are > made available to the constructor for x and A respectively.
What do you mean by "constructor" here? Normally that word refers to methods that populate the attributes of instances (in Python, __init__ and__new__). But functions and methods don't have such, so you must mean something else? > The same is not true for x=val. And cannot be, since no construction is involved, just evaluation of the rhs expression, and binding of the name to the result. > > Jonathan > _______________________________________________ > 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/GMUQMIGOHZGXF5VA6DG5SBM7WQRQBF7O/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ 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/2FSNZ3FRSFDLWZS24RMLROHN2HGY5LWZ/ Code of Conduct: http://python.org/psf/codeofconduct/