Closed mvcisback closed 6 years ago
Thanks. I pushed a fix that just checks the type explicitly. Namedtuples happen to have a constructor _make
that creates a namedtuple from an iterable, so I used that.
If all else fails you can just add a hook for your specific kind of namedtuple.
Great, is there any chance the pypi version could be upgraded?
Sure. Done.
Hey,
If using a NamedTuple the following does not work: https://github.com/ingolemo/python-lenses/blob/f5d14a131bcf6c37f55317faf70952434c208d4a/lenses/hooks/hook_funcs.py#L371
It would require
type(self)(*iterable)
I'm not sure how to best distinguish between these cases, but perhaps try both?