Python immutable types in function calls

前端 未结 2 892
暖寄归人
暖寄归人 2021-01-21 19:44

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

2条回答
  •  一向
    一向 (楼主)
    2021-01-21 20:13

    Python passes references to objects by value. So you dont need to worry about it.

提交回复
热议问题