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

super() takes at least 1 argument (0 given) #7

Open
OctopusLian opened this issue Aug 4, 2019 · 1 comment
Open

super() takes at least 1 argument (0 given) #7

OctopusLian opened this issue Aug 4, 2019 · 1 comment

Comments

@OctopusLian
Copy link
Owner

练习 9-6,9-7,9-8时出现的错误

Traceback (most recent call last):
  File "./Python-Crash-Course-Homework/chapter09/9-8.py", line 44, in <module>
    eric = Admin('eric', 'matthes', 'e_matthes', '[email protected]', 'alaska')
  File "./Python-Crash-Course-Homework/chapter09/9-8.py", line 24, in __init__
    super().__init__(first_name, last_name, username, email, location)
TypeError: super() takes at least 1 argument (0 given)
@OctopusLian
Copy link
Owner Author

原因是该方法调用super()为在python3中的方法,而此是在python2中运行的。

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