ingolemo / python-lenses

A python lens library for manipulating deeply nested immutable structures
GNU General Public License v3.0
313 stars 19 forks source link

Lenslike can be an abstract base class #39

Closed majidaldo closed 1 year ago

majidaldo commented 1 year ago

https://github.com/ingolemo/python-lenses/blob/90d7af9909590c9fc7e0a9d5508e18254df4a1f6/lenses/optics/base.py#L54

ingolemo commented 1 year ago

Is there a reason you're suggesting this; some benefit of ABCs that you'd like to take advantage of?

majidaldo commented 1 year ago

Is there a reason you're suggesting this; some benefit of ABCs that you'd like to take advantage of?

mainly for intent: you should not be able to LensLike(); you'd need to define all its @abstract methods.

(are there other classes like this?)