mutuple

Crates.iomutuple
lib.rsmutuple
version1.0.0
sourcesrc
created_at2024-04-11 02:40:52.463976
updated_at2024-04-11 02:40:52.463976
descriptionReplace items in Python's immutable tuples
homepagehttps://github.com/davvid/mutuple
repositoryhttps://github.com/davvid/mutuple
max_upload_size
id1204315
size9,284
David Aguilar (davvid)

documentation

https://docs.rs/mutuple/latest/mutuple

README

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')

Links

Commit count: 9

cargo fmt