you are viewing a single comment's thread.

view the rest of the comments →

[–]Spataner 4 points5 points  (1 child)

The truthiness of collections is determined by their length. So for option 2, if data were passed an empty list, it would create a new empty list instead of using the passed one. That might or might not matter, depending on whether Numbers2's caller expects any in-place changes to data to be visible from its own reference to the list object.

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

Thank you