|5 months ago||6 days ago|
|MIT License||BSD 2-clause "Simplified" License|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
We haven't tracked posts mentioning effect yet.
Tracking mentions began in Dec 2020.
A simple Rust-like Result type for Python
2 projects | reddit.com/r/Python | 2 Dec 2021
What can you do in Haskell that you can't do in Python(for example)?
3 projects | reddit.com/r/haskell | 15 May 2021
Functional semantics are available in Python, but IMO not that great. List, dict, and generator comprehensions allow you to perform most operations that you would use in a functional first programming language and there are third party libraries like toolz and funcy that implement some of the more advanced operations. The main issue I've found with using Python as a functional language is it doesn't support fluent syntax. With Scala you can do a relatively complex map/filter/reduce operation with syntactic ease list_of_ints.map(x => x*x).filter(x => x%2 ==0).reduce(x,y => x+y) With Python it's just clunky and less readable b/c of support of list comprehension syntax over fluent syntax. sum([x**2 for x in list_of_ints if x % 2 == 0]) A codebase with 5000 lines of the Scala style code will be much readable and maintainable than with the Python style code.
Exceptions are a common way of dealing with errors, but they're not without criticism. This video covers exceptions in Python, their limitations, possible alternatives, and shows a few advanced error handling mechanisms.
1 project | reddit.com/r/Python | 26 Mar 2021
Make tests a part of your app
4 projects | dev.to | 10 Mar 2021
dry-python/returns is a library with primitives that make typed functional programming in Python easier.
Higher Kinded Types in Python
dry-python/[email protected] is released! And it means that now anyone can use our Higher Kinded Types emulation in their projects.
Repository: https://github.com/dry-python/returns Don't forget to star it!
So, we would need several Kind alises to work with different amount of type arguments. It would also have a reasonable limit of three type arguments:
We can use a @kinded decorator for that together with one more custom mypy plugin. The idea of this hack is that we catch all calls of functions decorated with @kinded and transform their return type from Kind[I, T] into I[T].
We, in dry-python used this technique with @overload decorator for our previous versions. This allowed us to write correct definitions of functions working with generic types. But, they were limited to the pre-defined set of our own types. And we wanted to allow our users to create their custom types based on our interfaces. With the full existing code reuse.
What are some alternatives?
Toolz - A functional standard library for Python.
Coconut - Simple, elegant, Pythonic functional programming.
fn.py - Functional programming in Python: implementation of missing features to enjoy FP
CyToolz - Cython implementation of Toolz: High performance functional utilities
Pyrsistent - Persistent/Immutable/Functional data structures for Python
funcy - A fancy and practical functional tools
Deal - Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free.