On Mon, Jun 19, 2017 at 8:16 AM, Alireza Rafiei
<alireza.rafie...@gmail.com> wrote:
> I guess I should have framed it as a `quote` for python. You're absolutely
> right that it shouldn't be modifying the assigned object and it doesn't. I
> mentioned the Assign to say that in `x = f`, `x` has name as well, however
> `x.__name__` returns the name of `f` and not `x`.
>
> As for the `f = "hello"`, the value of the name "f" would be "hello" and the
> value of the name "hello" would be "hello".
>
> My proposal is to either change the behavior of `__name__` or have something
> similar that acts globally for all objects and types to get a quote-like
> behavior, provided that the operands of quotes are atomic.

Hmm. So... after x = f,  f.__name__ would be different from x.__name__?

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to