关联管理包
associations的Python项目详细描述
协会
This is an association management package.
对象
- 在
等级:
- Association(word:str,name:str,method=None,区分大小写=True,regular=False,**data)
- word-word创建关联
- name—您的协会的名称
- 方法-搜索关联时使用的方法(in/including/is)
- case\u sensetive-case sensitive搜索
- 正则-搜索时使用正则表达式
- 数据-要保存的数据
- 方法:
- 在
add()
在Add self to the list of associations
- 在
getdata()
在Get the data that was saved when you created it
- 在
getmethod()
在Get the method that is assigned at creation
- 在
isregular()
在Checks whether regular expressions are enabled
- 在
get_case\u sensitive()
在Checks whether register accounting is enabled
- 在
getname()
在Get the name of this association
- 在
set\u case\u sensitive(状态:bool)
在Enables or disables case accounting
- 在
- Association(word:str,name:str,method=None,区分大小写=True,regular=False,**data)
- 在
变量:
- 在
关联
It is the heir of the inner class "associations"
- 方法:
- 在
add(值:string,名称:str,方法:str,区分大小写=True,regular=False,**data)
在Create a new association and adds it to the associations list
- 在
add(值:关联)
在Add the association to the associations list
- 在
get(string:str)->列表
在Searches for all associations to the string "string"
- 在
- 方法:
- 在
示例
importassociationsassociations.Associations.add('hello','Greeting','including')print(associations.Associations.get('hello, world!')[0].getname())
输出:
Greeting
- 项目
标签: