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

TypeError: hasattr expected 2 arguments, got 3 #130

Closed
42B opened this issue Oct 11, 2018 · 2 comments
Closed

TypeError: hasattr expected 2 arguments, got 3 #130

42B opened this issue Oct 11, 2018 · 2 comments

Comments

@42B
Copy link
Contributor

42B commented Oct 11, 2018

if not isinstance(nodes, list) and not hasattr(nodes, 'Visit', False):

>>> hasattr(str, 'replace')
True
>>> hasattr(str, 'replace', False)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: hasattr expected 2 arguments, got 3

https://docs.python.org/3/library/functions.html#hasattr

@KingAkeem KingAkeem added Bug Hacktoberfest HackToberFest 2023 Valid labels Oct 12, 2018
@KingAkeem
Copy link
Member

This is a syntax error, would you like to submit a PR to fix this?

@KingAkeem
Copy link
Member

This has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants