place.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:osm-wikidata 作者: EdwardBetts 项目源码 文件源码
def name_for_change_comment(self):
        n = self.name

        if self.address:
            if isinstance(self.address, list):
                address = {a['type']: a['name'] for a in self.address}
            elif isinstance(self.address, dict):
                address = self.address

            if address.get('country_code') == 'us':
                state = address.get('state')
                if state and n != state:
                    return n + ', ' + state
        return 'the ' + n if ' of ' in n else n
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号