Skip to main content

A package that implements a switch statment

Project description

This project adds a switch object

On creation the object stores cases withing a dictionary, where the key is the case and the value is the result

On call the object checks the value pased and returs the result for that value that matches a case.

A result can be a function which will run when a case is matched

The call statemet takes parameters for this case

Cases can be dynaimically changed by setting the values with setitem, and also accessed with getitem

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

switchobject-1.0.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

switchObject-1.0.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file switchobject-1.0.0.tar.gz.

File metadata

  • Download URL: switchobject-1.0.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for switchobject-1.0.0.tar.gz
Algorithm Hash digest
SHA256 96bed118df9a812aad0fc1eb9a3ec5c820b9770aa1645ec16b8f59698c8c2bbe
MD5 3c2a7d7a0164e850787a6ad7a81c93c0
BLAKE2b-256 c3775042f89aa64d0bd716dd511a6667e81e3013d2d945e1e2527fb5aa8b5c28

See more details on using hashes here.

File details

Details for the file switchObject-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: switchObject-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for switchObject-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 595a48b59b51f5e2c5bde434714224466845127de4e6e6a1ed15a34beb0366bc
MD5 642df36687e782b63fcd237f54047962
BLAKE2b-256 3f04f4041d9e8dfa17c84b961678d91cda4d4b1ff2ad55562bbbc0d02e290d62

See more details on using hashes here.

Supported by

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