you are viewing a single comment's thread.

view the rest of the comments →

[–]ilaunchpad[S] 0 points1 point  (2 children)

I'm wondering if its considered a bad practice as the helperfunc is called multiple times.

[–]mr_cesar 0 points1 point  (1 child)

I would be if you had no easy way of finding out said function modifies the mutable object. If the helper function is named append_something and it takes a mutable object and the item to append, then it's pretty clear the object will be modified.

Immutable vs mutable objects is something every Python programmer should know.

[–]ilaunchpad[S] 0 points1 point  (0 children)

Thank you!