Skip to content

类似于JavaScript的Map的数据结构 / A data structure which is similar to Map in JavaScript

License

Notifications You must be signed in to change notification settings

HestStudio/PyTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTable

See English Documentation

介绍

类似于JavaScript的Map的数据结构
(目前还未完工,预计7月中旬完成)

使用说明

  • 初始化
# 每个元素以键值对的形式出现
myTable = Table([
    ['name', 'Lemonix'],
    ['age', 13],
    [1, 2] # 数字同样可以作为键
])
  • 获取值
myTable.get('name') # Lemonix
myTable.age # 13
myTable.get(1) # 2
  • 添加元素
myTable.add(['number', 7355608])
  • 清空Table
myTable.clear()
  • 获取所有值或键
myTable.keys # 键
myTable.values # 值

更多用法见代码

About

类似于JavaScript的Map的数据结构 / A data structure which is similar to Map in JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages