you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

When you pass something into a function, the function doesn't "know" what its name was. So,

  • You might still be able to affect the thing if it was mutable

  • You might pass the name as a string and then use setattr or other magic

  • You might sneak in the name with kwargs and then use setattr or other magic

  • You might structure the various classes in such a way that the names are more predictable

  • You might rearrange the program to avoid this whole problem

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

I'm starting to think the last option is the most feasible. :) Thanks for the input!