Skip to main content

Record list with handy methods

Project description

rlist

rlist is a small Python library that provides the rlist type (record list), which is a plain Python list extended with a few handy methods for in-place manipulation.
The methods are inspired by the corresponding Ruby array methods.

Documentation: https://maxcode123.github.io/rlist/

Example

from rlist import rlist

people = [
  {"age": 29, "name": "John", "sex": "M"},
  {"age": 67, "name": "Paul", "sex": "M"},
  {"age": 39, "name": "George", "sex": "M"},
  {"age": 18, "name": "Mary", "sex": "F"},
  {"age": 45: "name": "Margaret", "sex":  "F"}
]

people.select(lambda p: p["age"] > 30).reject(lambda p: "l" in p["name"]).map(lambda p: p["sex"])

Installation

pip install record-list

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

record_list-0.2.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

record_list-0.2.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file record_list-0.2.2.tar.gz.

File metadata

  • Download URL: record_list-0.2.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for record_list-0.2.2.tar.gz
Algorithm Hash digest
SHA256 517c6d5489674afe4b4b523ffb473a1dd1301a797562765693ad2dabfcff22f1
MD5 a4bb7229c295f055b055cc80451f4e2a
BLAKE2b-256 057ccb54c6f509c1d64016ad4f32a45a015176ec3df87dc067ac581504a0133c

See more details on using hashes here.

File details

Details for the file record_list-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for record_list-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 58d9b45984000b6707a7a444210689a4dc9f2a4dd45a0b4535dc814037bdf0db
MD5 4ee1d6128461a8adf67d9375c1c111f9
BLAKE2b-256 0744f043188a31d6062cc9b56ef83e1264de650a12a23d6f8568b856b8032903

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