def _SetDefaultsFromSchema(self):

    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)
Build a Counter from an iterable in one step.
dataset/ETHPy150Open adblockplus/gyp/pylib/gyp/xcodeproj_file.py/XCObject._SetDefaultsFromSchema--crossover with--dataset/ETHPy150Open mikeorr/WebHelpers2/webhelpers2/containers.py/Counter.correlate