I have an sqlalchemy query that returns a tuple. I pass this tuple to a function, and since it\'s an immutable type, a new instance of the tuple is created in the called functio
When you call a function, just a reference to the tuple gets passed, not a copy. The fact that it's immutable doesn't mean that it will be copied on a function call, just that you can't modify it.