💬

Community answer

Collected from the ACE community Discord archive around 2020-09-14. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

__eq metamethod argument count with colon

🖼️ RenderingUpdated 2 days ago•0 views
Defining __eq with a colon makes it a method - it receives (self, a, b) = 3 args; define it as function(a,b) for 2 args, or compare via the class() __eq which o…

Why does my __eq get 3 args / how to compare tables

Defining __eq with a colon makes it a method - it receives (self, a, b) = 3 args; define it as function(a,b) for 2 args, or compare via the class() __eq which only uses arg 1.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.