I'm trying to change the given value when I instantiate an object in Python. The arguments are 2 lists (list_A and list_B) that appear in a GUI. I can manipulate the value of list_A, all the values are boolean-type. I want the list_B to show some values, but to be dependent on the values of the list_A.
For example, if the first value of list_A is true, then show one half of list_B, if the second is true, then show the second half of list_B, and if both are true, show the whole list.
But I need to completely instantiate the object first, in order to read the values of list_A, and then modify list_B.
I have no access to the class, that's why I cannot modify the workflow, I need to do it this way.
instance_var = foo( list_A, list_B ) # this is how I instantiate the object
So I don't know if, after the instantiation, I can access and modify list_B.
Thank you
list_Ainto the constructor, you already have access to it. So why do you feel like you have to modifylist_Binside the class instead of before passing it?