Skip to main content

Magic Results

Usage:

# -*- coding: macro -*-

from magicresult import Result, ok, error, attempt

def get_str_ok() -> Result[str]:
    return ok("hello world")

def get_str_err() -> Result[str]:
    return error("something went wrong")

def magic_example() -> Result[None]:
    a = attempt(get_str_ok())
    print("First string is: " + a)
    b = attempt(get_str_err())
    print("Second string is: " + b)
    return ok(None)

print(f"magic_example returned {magic_example()}")

Release files for magicresult 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for magicresult 0.0.0
File Size Uploaded
magicresult-0.0.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for magicresult 0.0.0
File Interpreter ABI Platform
magicresult-0.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.5 kB

Release files / magicresult-0.0.0.tar.gz

Download URL magicresult-0.0.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e872996171f2848acf6253de723c37226070029a575b63ab984b1bffa9197a8
BLAKE2b-256 checksum
How to use checksums
ddfcf498b7d55bfcf6a994281097484bf1a7a726874c5746e5e1732d62014413
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / magicresult-0.0.0-py2.py3-none-any.whl

Download URL magicresult-0.0.0-py2.py3-none-any.whl
Size 4.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4c21bfa038c01c30124b17fcef7341a30619360ea9ad48328e9c5e3f96f01afd
BLAKE2b-256 checksum
How to use checksums
72cc51dabbc57c6029840ad6bd859c4873400525fd13dc35a1e72c1a318a2657
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page