Skip to content

doc: add FAQ entry for MethodError due to variable shadowing - #62822

Open
sentomas wants to merge 2 commits into
JuliaLang:masterfrom
sentomas:docs-faq-methoderror
Open

doc: add FAQ entry for MethodError due to variable shadowing#62822
sentomas wants to merge 2 commits into
JuliaLang:masterfrom
sentomas:docs-faq-methoderror

Conversation

@sentomas

Copy link
Copy Markdown

This PR adds an entry to the FAQ section explaining MethodError: objects of type X are not callable.

This commonly occurs when a user accidentally assigns a value to a built-in function name in the REPL (e.g., sqrt = 5) or omits multiplication operators. I personally ran into this exact stumbling block while following along and executing the hypot function example from Section 9.3 of the Julia 1.12 documentation. Adding this to the FAQ or in the manual of 1.12 should help clarify this tricky environment state for other beginners!
Julia

Added explanation for MethodError related to callable objects and common causes.
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

Successfully merging this pull request may close these issues.

1 participant