V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  llnhhycom  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2017 年 2 月 3 日
回复了 llnhhycom 创建的主题 Python 面向对象中类应该如何设计?
@814084764 你可以看下我的 Account 类,所有和账号有关的都在 Account 类中:
user = Account(uid=1)

user.nickname // 用户昵称
user.email // 用户邮箱
...
...
user.links() // 用户发布的所有链接
user.link()[0].title // 用户发布的链接的标题
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1197 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 23:34 · PVG 07:34 · LAX 16:34 · JFK 19:34
♥ Do have faith in what you're doing.