

@serialized
def __init__(self, session, uri=None, sp_playlist=None, add_ref=True):
    super(Playlist, self).__init__()
    assert (uri or sp_playlist), 'uri or sp_playlist is required'
    self._session = session
    if (uri is not None):
        sp_playlist = spotify.Link(self._session, uri)._as_sp_playlist()
        if (self is None):
            raise spotify.Error(('Failed to get playlist from Spotify URI: %r' % uri))
        session._cache[sp_playlist] = self
        add_ref = False
    if add_ref:
        lib.sp_playlist_add_ref(sp_playlist)
    self._sp_playlist = ffi.gc(sp_playlist, lib.sp_playlist_release)
    self._sp_playlist_callbacks = None
    self._lib = lib

dataset/ETHPy150Open mopidy/pyspotify/spotify/playlist.py Playlist.__init__/VarMisuse@82/113 `sp_playlist`->`self`