摘要: 对于私有属性常常会添加set以及get方法,此时可以使用Python内置的@property装饰器,将set以及get方法简化为如同属性一样调用 示例: 普通情况: class book: _score = 0 def __init__(self): self._score = 100 def ge 阅读全文
posted @ 2020-06-19 15:28 漆天初晓 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 登陆用户名usr密码123456 testdb的数据库mongo --host localhost -u "usr" --authenticationDatabase "testdb" -p'123456' 查看当前数据库db 查看所有数据库show dbs 查看所有表show collection 阅读全文
posted @ 2020-06-19 14:28 漆天初晓 阅读(106) 评论(0) 推荐(0) 编辑