These are chat archives for evhub/coconut
obj.__join__in this way? I'm tempted to run with it if there aren't any obvious problems you foresee in this approach.
Is it considered a bug that the following gives you a TypeError? Or a known and accepted limitation?
def func(): print('No arg version') @addpattern(func) def func(somearg): print('Received argument', somearg) func() # works func('something') # TypeError: func() takes 0 positional arguments but 1 was given
I didn't find anything about that in the docs.
multimethodpackage in python
Sure, there are possibilities to work around this, but imho this should just work. It does e.g. in Elixir:
defmodule Test do def func() do 1 end def func(a) do a end end Test.func() # returns 1 Test.func(42) # returns 42
It it's hard to make it work, a short mentioning in the docs would be nice.