On Wed, May 26, 2021 at 11:26:17AM -0000, Shreyan Avigyan wrote:
> Reply to Richard Damon:
> 
> The values can be changed. It can be mutated (if mutable). This idea suggests 
> we can't reassign anything to the name. Suppose,
> 
> constant x = ["List"]
> x.append("something") # OK
> 
> x = [] # Error


At last, a straight answer to the question of what this does. Thank you. 
Your answer here crossed with my previous post.

In the future, can you please try to use standard Python terminology 
instead of ambiguous language?

"The values can be changed" is ambiguous. That can mean mutating an 
object:

    x.append(None)  # mutation changes the value of x

and it can mean rebinding:

    x = None  # rebinding changes the value of x


So now tell us, what sort of error do you get? Is it a compile-time 
error or a run-time error?

> Think of it as a const *ptr. Don't think of it as const *ptr const.

What's a const *ptr and a const *ptr const?



-- 
Steve
_______________________________________________
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/LGIC5RTRWBCQWH2YE4LO4G6NXKSVLOFT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to