Skip to main content

No project description provided

Project description

attempt

This package provides some utilities for working with functions that might raise exceptions.

Example

from attempt import Attempt

def f(x):
    # returns TypeError if x is a str
    return x + 1


xs = [1, 2, 3, "int", None, {}, 4]
ys = map(Attempt(f), xs)
assert list(values(ys, ignore_failures=True)) == [2, 3, 4, 5]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attempt-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

attempt-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file attempt-0.1.1.tar.gz.

File metadata

  • Download URL: attempt-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for attempt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 946968d18298cf8d2f74387fdfbca605bfa0474ccf800c748404c414addee987
MD5 a4674f923c2ef97cb2fe7d90d9b80d0c
BLAKE2b-256 794e38b2b6c731d5a851bc24fbd46bd71b442d6954f7658274b3890e9e637b07

See more details on using hashes here.

File details

Details for the file attempt-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: attempt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for attempt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81e2bc8dfda2945d32f8ff8a3d5bf05b14825cffc22624087a70e05f1ef5672b
MD5 babf23ea1e75acd8d8086d226b5ba27c
BLAKE2b-256 4dfcec262e552fab3301ffb088a678ba18c59e30c0268cf9e22051178f7b6134

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page