There is no pass by reference at all in Python. You get a variable or an object. You TOTALLY CAN (can not) modify ab object in the function you're passing it to. Issue is: modifying an object is NOT pass by reference. Modifying memory is pass by reference. THAT IS WHAT REFERENCE MEANS.
So no, I can't pass my function a list x, expand the list into any number of lists, and have X now be that sequence of lists. I have to wrap all of those lists together into a nested list, making the entire idea useless.
There is no pass by reference at all in Python. You get a variable or an object. You TOTALLY CAN (can not) modify ab object in the function you're passing it to. Issue is: modifying an object is NOT pass by reference. Modifying memory is pass by reference. THAT IS WHAT REFERENCE MEANS.
So no, I can't pass my function a list x, expand the list into any number of lists, and have X now be that sequence of lists. I have to wrap all of those lists together into a nested list, making the entire idea useless.
(post is archived)