Closed maxifom closed 4 years ago
python --version Python 3.8.0 pip freeze multimethod==1.2 Test case:
python --version
Python 3.8.0
pip freeze
multimethod==1.2
from collections import namedtuple from typing import List from multimethod import multimethod TestNamedTuple = namedtuple( 'TestNamedTuple', ['a', 'b', 'c'] ) class TestClass(object): @multimethod def accept(self, items: List[TestNamedTuple]): pass if __name__ == '__main__': a = TestClass() a.accept([TestNamedTuple("1", "1", "1"), TestNamedTuple("2", "2", "2")])
This outputs: RecursionError: maximum recursion depth exceeded while calling a Python object
RecursionError: maximum recursion depth exceeded while calling a Python object
This is fixed already on master: d879956. Strings have to be special cased.
I think there's been enough fixes to warrant a release too.
v1.3
python --version
Python 3.8.0
pip freeze
multimethod==1.2
Test case:This outputs:
RecursionError: maximum recursion depth exceeded while calling a Python object