Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class artist:
- artist = ""
- path = ""
- album = []
- def __init__(self):
- # Make a copy of the list album
- # Before instantiation, album is a class reference
- # so it is shared between all instances.
- # Other fields, as immutables give no problem, as the reference
- # is changed when the value is changed.
- self.album = list(album)
- def setArtist(self, artist):
- self.artist = artist
- def getArtist(self):
- return self.artist
- def setPath(self, path):
- self.path = path
- def getPath(self):
- return self.path
- def addAlbum(self, album):
- self.album.append(album)
- def getAlbum(self):
- return self.album
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement