Talin

Results 296 comments of Talin

Another, slightly more expensive but flexible option is to change `__match__` so that it returns a tuple of: ``` (proxy, match_args, match_args_required) ``` In other words, the custom match function...

I think part of the problem is that all of the use cases where proxy != self are very hypothetical, so we're kind of debating in a vacuum.

``` @property def hostname(self): return CaseInsenitiveString(self._hostname) ``` ?

I would put it in an appendix, so as to not clutter the introductory explanation.

The 'see appendix a' should be linkified.

An alternative to returning a dictionary is to return some kind of "proxy object". This would be a simplified version of the object with a canonicalized set of attributes. The...

A related question: Can a class be made matchable via the addition of a metaclass?

I guess the real question is, is there a handy idiom for making a class be matchable without actually having to write a dunder method. Sounds like the decorator approach...

To answer your question about whether the lack of `__match__` should throw an error, I would say that it should throw. The reason is that if indeed it can _never_...

What about renaming `__match__` to `__match_kwargs__` to be consistent with the naming convention?