xcodeproj_file.py 文件源码

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

项目:sublime-bem-create 作者: bem-tools 项目源码 文件源码
def _SetDefaultsFromSchema(self):
    """Assign object default values according to the schema.  This will not
    overwrite properties that have already been set."""

    defaults = {}
    for property, attributes in self._schema.iteritems():
      (is_list, property_type, is_strong, is_required) = attributes[0:4]
      if is_required and len(attributes) >= 5 and \
          not property in self._properties:
        default = attributes[4]

        defaults[property] = default

    if len(defaults) > 0:
      # Use do_copy=True so that each new object gets its own copy of strong
      # objects, lists, and dicts.
      self.UpdateProperties(defaults, do_copy=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号