Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Record list data structure with handy methods

License

NotificationsYou must be signed in to change notification settings

Maxcode123/rlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rlist is a small Python library that provides therlist type (record list), whichis 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

fromrlistimportrlistpeople= [  {"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(lambdap:p["age"]>30).reject(lambdap:"l"inp["name"]).map(lambdap:p["sex"])

Installation

pip install record-list

About

Record list data structure with handy methods

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp