C
Carlo v. Dango
Hello there. I have a function which as an argument takes a tuple and
either returns that tuple or a mutated version of it. The problem is that
tuples are imutable, hence I have to create a new tuple and copy the
content of the old tuple to a new one.
But how do I do this if I only at runtime know the size of the tuple? I
wish I could pass around lists instead.. that would be so much easier, but
I'm passing "*args" and "**kwargs" around so I'm not really the one
deciding the use of tuples or lists
Am I the first one with a problem like this? I'm not able to find anything
using google on this topic. Hope someone can help me
-Carlo v. Dango
either returns that tuple or a mutated version of it. The problem is that
tuples are imutable, hence I have to create a new tuple and copy the
content of the old tuple to a new one.
But how do I do this if I only at runtime know the size of the tuple? I
wish I could pass around lists instead.. that would be so much easier, but
I'm passing "*args" and "**kwargs" around so I'm not really the one
deciding the use of tuples or lists
Am I the first one with a problem like this? I'm not able to find anything
using google on this topic. Hope someone can help me
-Carlo v. Dango