"""Solution 6.5.2 — Making a shallow copy

Chapter 6: Objects — Everyday Programming

Bug type: Runtime

prices.copy refers to the method without calling it, so copy_of_prices
becomes a method object and .append raises an AttributeError. Calling
prices.copy() makes the independent copy.

Exercise: ex_6_5_2.py
"""

prices = [1.99, 2.49, 0.99]
copy_of_prices = prices.copy()
copy_of_prices.append(5.00)
print(prices)            # [1.99, 2.49, 0.99]
print(copy_of_prices)    # [1.99, 2.49, 0.99, 5.0]
