Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommendation for cached-property #46

Merged
merged 2 commits into from
May 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions go-to-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ accomplish certain tasks.

### [Parsimonious](https://github.com/erikrose/parsimonious)

@piper
@piper recommends

This is a good choice if you need to parse a simple grammar such as ABI type
strings. For complex grammars it can be lacking in expressiveness.


### [PyParsing](https://pyparsing-docs.readthedocs.io/en/latest/)

@piper
@piper recommends

This is likely the most well established parsing library in the python
ecosystem. It uses python classes for constructing the grammar which requires
Expand All @@ -30,10 +30,20 @@ just a function to process the parsed result.

### [Lark](https://github.com/lark-parser/lark)

@piper
@piper **does not** recommend

I can't currently recommend Lark. It's got a nice grammar and API but the
library doesn't appear to be very well maintained or documented and there are
places where the documentation doesn't match the library or the library doesn't
behave in documented ways. Expect to end up reading the code some if you
choose this for anything very complex.

### [`cached-property`](https://pypi.org/project/cached-property/)

@piper recommends

For `@property` methods that are safe to cache this provides a clean, well tested,
and highly performant mechanism. Use of this however collides with the `__slots__`
approach.

> NOTE: https://github.com/pydanny/cached-property/issues/69 demonstrates how to combine this with `__slots__`.