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

__call__ unclear in documentation #5309

Open
mjmdavis opened this issue Mar 31, 2021 · 4 comments · May be fixed by #5390
Open

__call__ unclear in documentation #5309

mjmdavis opened this issue Mar 31, 2021 · 4 comments · May be fixed by #5390
Labels
🔰 Good first issue 📄 type: Documentation Updates, fixes and additions to documentation

Comments

@mjmdavis
Copy link

Perhaps I missed something but it took me a while to realise that there was an __call__ on this object. Perhaps extending the example would help prevent people from having this issue in future.

def __call__(self, coords):

@jni jni added the 📄 type: Documentation Updates, fixes and additions to documentation label Mar 31, 2021
@jni
Copy link
Member

jni commented Mar 31, 2021

Great idea @mjmdavis! Indeed you're not the first to be confused by this! 😬 And I think many Python newbies might not even realise what __call__ does.

@hiren-2911
Copy link

The call method enables Python programmers to write classes where the instances behave like functions and can be called like a function.The call method enables Python programmers to write classes where the instances behave like functions and can be called like a function.

example

@alexdesiqueira alexdesiqueira linked a pull request May 16, 2021 that will close this issue
@alexdesiqueira alexdesiqueira linked a pull request May 16, 2021 that will close this issue
@kunalgaur7983
Copy link

Is this issue is opened?

@lagru
Copy link
Member

lagru commented Mar 10, 2023

@kunalgaur7983 Sorry for the late response. This issue was being worked on in #5390 though work has stalled a bit. We are trying to figure out if the original contributor intents to continue working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔰 Good first issue 📄 type: Documentation Updates, fixes and additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants