Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.8 子类中扩展property 中self.name = name 写错了, 换成self._name #351

Open
tafanfly opened this issue Jun 29, 2021 · 0 comments

Comments

@tafanfly
Copy link

class Person:
def init(self, name):
self.name = name

# Getter function
@property
def name(self):
    return self._name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant