Skip to main content

Determ is a simple module which automatically appends the correct determiner to a given string or list element.

Project description

Determ

Latest Version Licence Code Style

Determ is a simple module which automatically appends the correct determiner to a given string or list element. Only one function is required determiner but what it does depends on the datatype supplied.

Determiner can only determine lists and strings. It will attempt to gracefully handle an exception if any other datatype is supplied.

Feature Overview

Example usage with a string:

Supply determ's determiner function with a string you want to determine.

from determ_package import determ
# Passing determ a string to determine.
test_consonant = "fish"
test_vowel = "aardvark"
# This is not a list or string so will throw an exception when determ attemps to determine it.
test_exception = 1
print("String determ test consonant: " + determ.determiner(test_consonant))
print("String determ test vowel: " + determ.determiner(test_vowel))
print("String determ test exception: " + determ.determiner(test_exception))

Output:

String determ test consonant: a fish
String determ test vowel: an aardvark
String determ test exception: can not determine this datatype

Example usage with a list:

Supply the determ's determiner function with a list and the element index want to determine.

from determ_package import determ
list = ['fish', 'dog', 'cat', 'aardvark']
for i in range(0, len(list)):
    print(str("Element ") + str(i) + str(" determined: ") + determ.determiner(list, i))

Output:

Element 0 determined: a fish
Element 1 determined: a dog
Element 2 determined: a cat
Element 3 determined: an aardvark

Installation

On all operating systems, the latest stable version of determ can be installed using pip:

pip install -U determ

determ works with Python 3.6+ on Windows, macOS, and Linux. It is pure Python code with no 3rd-party dependencies.

Documentation

The latest documentation for determ is present in this README.

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

determ-0.0.21.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

determ-0.0.21-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file determ-0.0.21.tar.gz.

File metadata

  • Download URL: determ-0.0.21.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for determ-0.0.21.tar.gz
Algorithm Hash digest
SHA256 2401fb56b435de27b77d2e65ca76aad9dc52413ff47865b03776da7927d70c2a
MD5 2e63d32b8eeec962b3599d8f92de11d8
BLAKE2b-256 20f267a297e420162bce6b81a7ddef819855c2ae88d3a9013d725177e7ffd59f

See more details on using hashes here.

File details

Details for the file determ-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: determ-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for determ-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 0a8e49faa0ce96bc7ee6a16a3d6ee94fce8ee4652d1e996608a947fe94ef6411
MD5 393a625a0e2729698c9f4530140ac0cf
BLAKE2b-256 8b9b3b88224c21ab57bbd02da7346895cb4084ddabaf6f253184c44b4abbc461

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