A. Coady

Results 11 comments of A. Coady

I don't think it's possible. `scalar_product` is a single multimethod object. So even if it did some sort of code generation with annotations on the `__call__` method, it's not clear...

AFAICT, `typing.overload` doesn't do anything; editors must be statically checking for it. Tried the same example with `functools.singledispatch` and VSCode showed ``` instance _SingleDispatchCallable(*args: Any, **kwargs: Any) -> _T ```

One problem is that `staticmethod` has to be applied last (once). ```python class AAA(): @multimethod def from_producer(producer: Callable[..., int]) -> None: q = 1 @staticmethod @multimethod def from_producer(producer: int) ->...

You might be interested in [django-model-values' F](http://django-model-values.readthedocs.io/en/latest/reference.html#f) expressions, as a reference implementation of essentially the same idea. The only difference is I choose to just subclass `F`, so the intermediate...

> Does it need any special handling for lists / lists-of-lists? No, maybe just more examples. Calling out that any value is a valid default value, including `{}` and `[]`....

The problem is the requirement that only positional args participate in dispatch, but keyword args are still allowed. Calling `foo_object(object(), baz=None)` should match `def foo_object(bar: object, baz):` but not `def...

Here are some utilities to spark ideas. I've used this wrapper: ```python def doc_field(func: Optional[Callable] = None, **kwargs: str) -> StrawberryField: if func is None: return functools.partial(doc_field, **kwargs) for name...

Another issue to consider is whether the current way discourages documentation, or at least lengthy documentation. An advantage of docstrings is the builtin paragraph formatting. I'm curious how users handle...