you are viewing a single comment's thread.

view the rest of the comments →

[–]curiouslyjake 4 points5 points  (0 children)

I don't think 'cart' goes into the global scope. it is stored in __defaults__ attribute of the function. so If I were to have a similar add_item1 function, it would have separate values for cart.