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

Cursing int with __iter__ fails with an error #51

Open
toxicrecker opened this issue Nov 28, 2020 · 1 comment
Open

Cursing int with __iter__ fails with an error #51

toxicrecker opened this issue Nov 28, 2020 · 1 comment

Comments

@toxicrecker
Copy link

Python 3.8.3

Code -

from forbiddenfruit import curse

def __iter__(self):
	return iter(range(self))
	
curse(int, "__iter__", __iter__)

Output -

forbiddenfruit/__init__.py", line 329, in _curse_special
    tp_as_name, impl_method = override_dict[attr]
KeyError: '__iter__'
@radiantgurl
Copy link

This issue will be fixed once my pull request is accepted and merged, till then you can use the package from the pull request of mine with __iter__ integrated

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

2 participants