Skip to main content

Small Python library to check if a character is a punctuation character

Project description

ispunct

A small Python library for checking whether a character is a punctuation character.


Quick Start

from ispunct import ispunct

assert ispunct("?")
assert not ispunct("a")
assert ispunct("‽")

Using ispunct as a Library

This package is published on PyPI. You can install it with PIP:

$ pip add ispunct

Or, if using UV for dependency management:

$ uv add ispunct

Notes on Internal Functionality

This library also implements (and uses internally) bitwise functions to calculate the number of leading/trailing zeros/ones in the bitwise representation of a Python integer. We also compute a Python integer that has the same bitpattern as a given character (i.e., simulating Julia's bitcast).

Citation

If your research depends on ispunct, please consider giving us a formal citation: citation.bib.

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

ispunct-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

ispunct-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ispunct-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ispunct-1.0.0.tar.gz
Algorithm Hash digest
SHA256 71e8da9e0bc140ace1ff4c3fc1caaa1bd754e2e0a9e76c3691c2a8ce97580677
MD5 3f1ef3d6364600dffc6f98a5086fdb53
BLAKE2b-256 b121dc9dcc0b8581cbfb58132c2e5f41d3a6f4c4bba635e72c3b4e60bdd88d41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ispunct-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ispunct-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 799a608576088475eee499d959d76b195a470a5ee659ab786003b6a186753284
MD5 ae8146e02a50c18c32fb6fece5a4c8c4
BLAKE2b-256 b8d42946425191370fa0bf4ac4c0fba22b4f73609c6ab6ed3ec42501bebade61

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