0

What started out as programming has turned into a curious language/grammar question.

I'm writing a program and want to clearly specify a variable name. The variable will be a dictionary and each item in the dictionary stores the details of a "revision".

variable = {
    "revision_a": {"detail_a": "", "detail_b": ""},
    "revision_b": {"detail_a": "", "detail_b": ""}
}

I want to name the variable revision_details but I don't believe it clearly communicates what the list is. If I saw a variable named revision_details I would assume that it stores details about a single revision.

revision_details = {"detail_a": "", "detail_b": ""}

In this case would revisions_details be correct grammar? If this is or something similar correct what is the official term for this and what does the correct version look like? Otherwise would I just need to find a different name like details_of_revisions or just revisions?

To clarify, what is the right way to say "revisions details", i.e. multiple details about multiple revisions?

Chappo Hasn't Forgotten
  • 3,166
  • 8
  • 24
  • 35

1 Answers1

0

I guess it would technically be something like

revisions' details

But I don't know if you really wanted to put an apostrophe in your code. You should probably go with whatever will make the code clearest. Maybe just "revisions," though "revisions_details" is fine too.

The language you're discussing is kind of a cross between English and Python (or whatever coding language it is), so you can pretty much mix it as you like.

codi6
  • 193
  • 1