Skip to content

day09 面向对象进阶中关于__slots__的部分是不是存在代码缺失问题? #1042

@kmoonn

Description

@kmoonn

image
图中示例代码的报错:AttributeError: 'Person' object has no attribute '_is_gay',但是示例代码中没有调用也没有定义_is_gay 方法。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions