So in the Veneer Project in the Computer Science career track, we are asked to append an only previously defined object within a method of a separate Class (see code below).
I am wondering whether it is common to use a specific object within a method?
Lets assume someone named his Marketplace differently. The method “sell_artwork” within our Client class would no longer work. Or am I missing something here?
Let me know if the description of my question/uncertainty is clear
veneer = Marketplace () class Client: def __init__ (self, name, location, is_museum): self.name = name self.is_museum = is_museum if self.is_museum: self.location = location else: self.location = "Private Collection" def sell_artwork (self, artwork, price): if artwork.owner == self: new_listing = Listing (artwork, price, self) veneer.add_listing(new_listing)