Python3注释错误

时间:2018-02-02 07:39:45

标签: python python-3.x python-3.6

当我使用python3注释时

class UserBean(SerializationBean):

    # serial_field = {"account", "nick_name"}
    non_serial_field = {"password"}

    def __init__(self, account: str = None, password: str = None, nick_name: str = None, roommate: UserBean = None):
        super().__init__()
        self._account = account
        self._password = password
        self._nick_name = nick_name
        self._roommate = roommate

室友的注释会引发NameError:name' UserBean'没有定义 如何解决?

0 个答案:

没有答案