Skip to main content

No project description provided

Project description

mutuple

Replace items in Python's "immutable" tuples.

Why?

yolo

How?

We use Rust's PyO3 crate to manipulate tuples directly using the Stable CPython API. Editing tuples can lead to issues but works in practice for limited use cases.

Usage

import mutuple


def test_mutable_tuple():
    """mutuple tuple demo"""
    value = ('read-only', 'tuple')
    mutuple.setitem(value, 0, 'mutable')

    assert value == ('mutable', 'tuple')

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

mutuple-1.0.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distributions

mutuple-1.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (229.3 kB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

mutuple-1.0.0-cp37-abi3-macosx_14_0_universal2.whl (209.9 kB view hashes)

Uploaded CPython 3.7+ macOS 14.0+ universal2 (ARM64, x86-64)

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