Veneer Project - .show_listing() doesn't work

Hello everyone,

I’ve been working on the Veneer project. When I use the .show_listing() method it prints (<main.Listing object at 0x7fb84bee2e10>).

I’ll appreciate it if anyone can tell me what I’m doing wrong.

Below is my code:

class Art:
  def __init__(self, artist, title, medium, year, owner):
    self.artist = artist
    self.title = title
    self.medium = medium
    self.year = year
    self.owner = owner

  def __repr__(self):
    return self.artist + ". " + self.title + ". " + str(self.year) + ", " + self.medium +". " + + ', ' + self.owner.location

class Marketplace:
  def __init__(self):
    self.listings = []
  def add_listing(self, new_listing):

  def remove_listing(self, deleted_list):

  def show_listing(self):
    for i in self.listings:

class Client:
  def __init__(self, name, location, is_museum): = name
    self.is_museum = is_museum
    if is_museum:
      self.location = location
      self.location = 'Private Collection'

  def sell_artwork(self, artwork, price):
    if artwork.owner == self:
      new_listing = Listing(artwork, price, self)

class Listing:
  def __init__(self, art, price, seller): = art
    self.price = price
    self.seller = seller

  def __rerp__(self):
    return '%s, %s.' % (, self.price)

veneer = Marketplace()


edytta = Client('Edytta Halpirt', None, False)

moma = Client('The MOMA', 'New York', True)

girl_with_mandolin = Art('Picasso, Pablo', 'Girl with a Mandolin (Fanny Tellier)', 'oil on canvas', 1910, edytta)


edytta.sell_artwork(girl_with_mandolin, '$6M (USD)')


what you see there is default representation. While Listing implements a __repr__. so there might be a problem there. And sure enough when we inspect your magic method:

def __rerp__(self):

I see a problem, you to?

1 Like

I’m sorry but I don’t understand where the problem is

Now I do. I have to pay attention to typos because they will be the end of me :rofl:

Thank you! :smiley: