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 rlist

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.1.0.tar.gz (4.1 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.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for record_list-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dfa961dfd2b2a9d782a33229f94143cb975c517fb9fafb9d7a9de56ecb20b6bd
MD5 8fb3e631a306be670b6a5a229a065d54
BLAKE2b-256 b71bae71ffc834ddad4a13ef4fcef6f32e51f658effe8d1feab6c29574bf1345

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for record_list-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c815149efa5386583326e737ca301e73e3d94f72f49aa97fa839b0fc515e210c
MD5 62ae856f468bc49cc303f585aefee0f7
BLAKE2b-256 33af32253edea3023503f272764c94f93dea2ef6244759d6e23712f62b7b3d4a

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