Understanding pickle in Python