pyrsistent icon indicating copy to clipboard operation
pyrsistent copied to clipboard

Persistent/Immutable/Functional data structures for Python

Results 35 pyrsistent issues
Sort by recently updated
recently updated
newest added

It might be that I am misunderstanding the point of transform, but I want to do pasically the following transformation: `[{"upper":"A"}, {"upper":"B"}] -> [{"upper":"A", "lower":'a'}, {"upper":"B", "lower":'b'}]` I would have...

1) Mixining two classes that both inherit from `pyrsistent.PClass` fails: ```python import pyrsistent class TimestampMixin(pyrsistent.PClass): created_at = pyrsistent.field() deleted_at = pyrsistent.field() updated_at = pyrsistent.field() class IDMixin(pyrsistent.PClass): id = pyrsistent.field() class...

enhancement
help wanted

As stated in #251, I would like to have the syntactic sugar for mapping directly from the pvector.

I changed that description since the former one promises more, than it can hold.

I would suggest a version of the `transform` method, where there is no change if a field is missing. My motivation is, that I like the idea of pyrsistent's tranformation,...

I recently had to rip out some pyrsistent code because using it was 10× slower than regular Python data structures. It's probably possible to do better than current implementation. Some...

enhancement

https://github.com/tobgu/pyrsistent/commit/30f138142923669c9da327abe214986919d52a07 changed the way transforms work so that they add intervening nodes from the matcher which didn't previously exist. This addressed the case in https://github.com/tobgu/pyrsistent/issues/154 and made ``` >>> freeze({}).transform(['foo','bar'],m())...

Consider the following code snippet contained in a python module named `pyrsistent_test.py`: ```python from typing import Mapping from pyrsistent import field, PRecord class MyPRecord(PRecord): f = field(type=Mapping) def main(): p...

help wanted

When trying the example with pylance/pyright in vscode, I get an "PylancereportMissingTypeArgument" type hint error: e.g.: ``` class ARecord(PRecord): x = field() ``` PRecord is flagged with 'Expected type arguments...

help wanted

Python 3 introduces several new behaviors for `dict` which have been mentioned in [previous](https://github.com/tobgu/pyrsistent/issues/159) [issues](https://github.com/tobgu/pyrsistent/issues/134), but a unifying issue might be useful to the discussion. Both of these changes are...