class Book:
def __init__(self, title, author, translators, edition, pages, publishing_company):
print("Construindo objeto ... {}".format(self))
self._title = title
self._author = author
self._translators = translators
self._edition = edition
self._pages = pages
self._edition = edition
self._publishing_company = publishing_company
def register(self):
print("The {} book written by the author {} is registred".format(self._title, self._author, self._translators,
self._edition, self._pages, self._edition,
self._publishing_company))
@title.setter
def title(self, title):
print("Chamando setter title()")
self._title = title
Boa noite pessoal, criei uma classe para registrar livros da minha biblioteca, porém com objetivo de exemplificar o setter, criei a def title.
@title.setter
def title(self, title):
print("Chamando setter title()")
self._title = title
Porém o pycharm acusa um erro "Unresolved reference 'title'" Se alguém puder ajudar?