代码没有高亮
cleiveliu opened this issue · comments
Python 工匠:写好面向对象代码的原则(中)
中的一段代码没有高亮 忘写python了,这算Bug吗?还是feature.
原文:
现在,假设我需要写一个函数,来获取和用户有关的所有帖子标题:
def list_user_post_titles(user: User) -> Iterable[str]:
"""获取与用户有关的所有帖子标题
"""
for post_id in user.list_related_posts():
yield session.query(Post).get(post_id).title
漏写啦,我晚点修复下。