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

`data & lens[1].get()` throw a TypeError: unsupported operand type(s) for &: 'list' and 'function' #42

Closed kilesduli closed 1 year ago

kilesduli commented 1 year ago

In python-lenses document, the State-first Syntax section mentions that you can use the 'state & setter' syntax to avoid verbose syntax.

But it doesn't work.

Is it something mistake or removed feature?

ingolemo commented 1 year ago

You're looking at the docs for git master, but you're probably using version 1.1.0 from pypi. This feature hasn't made it into a release yet. I've been lax on doing releases. It's probably time for one.

kilesduli commented 1 year ago

Thanks a lot. I've tried it on the version 1.2 and it works fine.