skip to navigation
skip to content

Not Logged In

either 0.2

"Either" and "Maybe" data structures

https://github.com/kennknowles/python-either

This library provides two fundamental near-trivial data structures for Python:

  • Either also known as "coproduct", "sum type", "variant", "tagged union", "disjoint union", etc: A value that comes from one of two sets
  • Maybe also known as "option" or "Either Nothing": A value that may be missing. (Python has "None" but it does not compose)

Each is ~10 lines, mostly boilerplate, but now they are in one place in a library.

Further Reading:

If you are unfamiliar with these concepts, here is some reading from around the web:

Either:

Maybe:

Contributors

 
File Type Py Version Uploaded on Size
either-0.2.tar.gz (md5) Source 2012-08-20 5KB
  • Downloads (All Versions):
  • 13 downloads in the last day
  • 70 downloads in the last week
  • 240 downloads in the last month