Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playlist.py: adding .copy() to locals() preventing kwargs to be sent … #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 7, 2015

  1. playlist.py: adding .copy() to locals() preventing kwargs to be sent …

    …over HTTP
    
    Both static() and basic() functions use kwargs = locals() in order to retrieve the long list of keyword arguments as a dictionary. This is practical, however in python 2.7.6, the actual "kwargs" variable does get scanned by locals() and added as a reference to that dictionary. This ends in kwargs == {...variables key-value pairs..., "kwargs": {the same key-value pairs as before}} and that ugly variable is then sent online to the Echo Nest API.. Using kwargs = locals().copy() removes that kwargs=>kwargs embedded key-value pair.
    
    This also occurs in song.py... Let us check that later.
    myselfhimself committed Oct 7, 2015
    Configuration menu
    Copy the full SHA
    ca65bce View commit details
    Browse the repository at this point in the history