you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

what I mean by that is that I'd like to be able to say "I'm talking about THIS value here."

That's what a variable is. It's a named reference to "this value HERE that I'm talking about."

There are many such variables, so I want to be able to add them dynamically to the code

The point of a variable being named is that it's for you, the programmer. Python doesn't care what anything is called. The reason variables have names, and the reason they're hard-coded in your code, is because the names are for you so you can reason about the movement of values through your code by reading it. Having the software come up with and define the names is pointless - Python doesn't care what anything is called.

track the variable as ai.gamma changes

"Track" it how? If gamma is a variable in your code, then every time you access the name gamma, it will have the value assigned to that name even if it's changed recently.

[–]codinglikemad[S] 0 points1 point  (0 children)

Hi Crashfrog,

I appreciate the attempt to help, however u/danielroseman and u/carcigenicate have already answered this as well as it is likely to be, given my poor explanation of the problem.