I'm reading a book about the structure of Python. In Python, when you copy a list by using the syntax:

new_list = list(a_list)

This causes a new list to be created and this is known as shallow copy. However, Python's lists are referential, and the new list represents a sequence of references to the same elements as in the first.

Then the author wrote a sentence:

With immutable elements, this point is moot.

I looked up dictionaries and found some explanations:

  • If something is a moot point or question, people cannot agree about it.
  • A "moot" point is debatable and open for discussion but may not come to any satisfactory conclusion or whose conclusion may be meaningless.

But I don't think these explanations are proper. I think the meaning of moot here is that the effect of shallow copy can be acceptable because if you modify or change the new_list resulted from shallow copy, it won't affect the original list.

Am I right, or there is other correct explanation?

  • If the sentence you're asking about comes immediately after "...a sequence of references to the same elements as in the first list", then the author left out "the point" to which he refers. The omitted sentence would go something like this: "Thus, when you change any element in the copy that you have produced in this manner, you are also changing the original to which it refers". Then he could write: "However, with immutable elements (those which cannot be changed), this issue is moot." But a question arises: Does the copy inherit the original's immutability? – Tᴚoɯɐuo Apr 22 '17 at 11:21
  • @Tᴚoɯɐuo: Yes, it does. Roughly speaking, in Python, immutability is a property of types, not of individual objects. Immutable objects like (for example) integers will never change their value. So if you and I each have a reference to the integer 2, it's moot whether the two references are copies of each other or not: I can't change my copy to actually have a value of 3, so it's pointless to ask whether or not yours would change too. (Actually I think native numeric types in Python are handled specially, but this is just for illustration.) – Tim Pederick Apr 22 '17 at 13:37

You're correct, but this meaning of "moot" comes under the second of your dictionary definitions:

A "moot" point is [one] whose conclusion may be meaningless.

I have abbreviated it because I agree that the whole definition, about being "debatable and open for discussion", is not entirely satisfactory. It implies there might be some disagreement over the point. "Moot" does not have to mean that anyone would disagree with your point, which might be completely factual (as it is here); it can simply mean that the facts you're laying out make no difference to the conclusions.

There is a difference between a shallow copy and a deep copy when your list contains only immutable elements, but the difference is moot (meaningless), because you can't change anything that would make a difference to your original list.

| improve this answer | |

A "moot" is an archaic word for a kind of deliberate assembly (similar to "parliament" or "congress"). All of the meaning of moot come from that original meaning. So:

A "moot point" is one which has no immediate relevance. Intrinsically, it might be important or not, but it doesn't matter right now. This meaning says "talk about it at the next town meeting, but it doesn't matter now."

An idea or discussion which "is moot" is usually one which is worthy of being raised at the next meeting. However, sometimes this construction has the same meaning as "moot point," so you have to look at context for the meaning.

When [something] "renders" [something else] moot, it means the same as "moot point." That [something] has made the [something else] irrelevant. [Something else] might be interesting to discuss later, but it isn't valuable right now.

Finally, when something has been "mooted" at an event or by an group, it means it has been discussed there in depth. It also implies that it hasn't been rejected.

The only modern, literal use of "moot" I am aware of is in The Lord Of The Rings: when the Ents (tree people) get together to decide whether to go to war, that meeting is an "Ent moot."

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.