class Media_Work(object):
  def __init__(self):
    _id: int = 0
    _IdDict: {} 
    _titleDict: {}
class Poem(Media_Work):
  def __init__(self, id, title, author, content, age, mtype, verbs):
    super().__init__()
    self.id = id
    self.title = title
    self.author = author
    self.content = content
    self.age = age
    self.mtype = mtype
    self.verbs = verbs
    Poem._IdDict.update({id: self})
My error message:
AttributeError: 'Poem' object has no attribute '_IdDict'
Similar error if I change the bottom line to:
self._IdDict.update({id:self})
New error message:
AttributeError: type object 'Poem' has no attribute '_IdDict'
 
     
     
    