effect VS returns

Compare effect vs returns and see what are their differences.


effect isolation in Python, to facilitate more purely functional code (by python-effect)
Our great sponsors
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • OPS - Build and Run Open Source Unikernels
effect returns
0 9
334 2,065
0.3% 3.2%
1.1 9.4
5 months ago 6 days ago
Python Python
MIT License BSD 2-clause "Simplified" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.


Posts with mentions or reviews of effect. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning effect yet.
Tracking mentions began in Dec 2020.


Posts with mentions or reviews of returns. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-12-02.
  • 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
    7 projects | dev.to | 25 Oct 2020
    dry-python/[email protected] is released! And it means that now anyone can use our Higher Kinded Types emulation in their projects.
    7 projects | dev.to | 25 Oct 2020
    Repository: https://github.com/dry-python/returns Don't forget to star it!
    7 projects | dev.to | 25 Oct 2020
    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:
    7 projects | dev.to | 25 Oct 2020
    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].
    7 projects | dev.to | 25 Oct 2020
    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?

When comparing effect and returns you can also consider the following projects:

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.