So I had no particular issues with this project, but I did have one question. In the .sell_artwork() and .buy_artwork() methods inside the Client class, we are told to add the listing using veneer.add_listing(), or remove it with veneer.remove_listing(). I did that and it worked, but I was wondering how come we can call the veneer Marketplace without defining it anywhere in said class. Shouldn’t it be a TypeError ?
class Client: def __init__(self, name, location, is_museum): self.name = name self.location = location self.is_museum = is_museum def sell_artwork(self, artwork, price): if artwork.owner == self: artwork = Listing(artwork.title, price, artwork.owner) veneer.add_listing(artwork) def buy_artwork(self, artwork): if artwork.owner != self: for listing in veneer.listings: if listing.art == artwork.title: artwork.owner = self veneer.remove_listing(listing) else: pass