.. deprecated:: 2.0
       Use :any:`BSP.parent` instead.
481193
def bsp_father(node: tcod.bsp.BSP) -> Optional[tcod.bsp.BSP]:
    
    return node.parent
329429
def parent_ref_rules(root)
      current_rule = nil
      root.children.map! do |child|
        unless child.is_a?(Tree::RuleNode)
          parent_ref_rules(child) if child.is_a?(Tree::DirectiveNode)
          next child
        end

        sseq = first_sseq(child)
        next child unless sseq.is_a?(Sass::Selector::SimpleSequence)

        firsts, rest = [sseq.members.first], sseq.members[1..-1]
        firsts.push rest.shift if firsts.first.is_a?(Sass::Selector::Parent)

        last_simple_subject = rest.empty? && sseq.subject?
        if current_rule.nil? || first_sseq(current_rule).members != firsts ||
            !!first_sseq(current_rule).subject? != !!last_simple_subject
          current_rule = Tree::RuleNode.new([])
          current_rule.parsed_rules = make_sseq(last_simple_subject, *firsts)
        end

        if rest.empty?
          current_rule.children += child.children
        else
          rest.unshift Sass::Selector::Parent.new
          child.parsed_rules = make_sseq(sseq.subject?, *rest)
          current_rule << child
        end

        current_rule
      end
      root.children.compact!
      root.children.uniq!

      root.children.each {|v| parent_ref_rules(v)}
    end
1040232
def prevparent(self, parent, depth):
        '''
        
        '''
        pdir = os.path.dirname(self.name)
        if depth > 1:  # can't jump to parent of root node!
            for c, d in parent.traverse():
                if c.name == self.name:
                    break
                if c.name.startswith(pdir):
                    parent.curline -= 1
        else:  # otherwise jus skip to previous directory
            pdir = self.name
            # - 1 otherwise hidden parent node throws count off & our
            # self.curline doesn't change!
            line = -1
            for c, d in parent.traverse():
                if c.name == self.name:
                    break
                if os.path.isdir(c.name) and c.name in parent.children[0:]:
                    parent.curline = line
                line += 1
        return pdir
72527
def parent(self):
        
        p = self._lib.dirname(self.path)
        p = self.__class__(p)
        return p
363176
def pull_parent(collector, image, **kwargs):
    """"""
    log.warning("")
    pull_dependencies(collector, image, **kwargs)
371908
def parent(self):
        ""
        if self._parent:
            return self._parent
        # auto-compute parent if needed
        elif getattr(self, '__parent_type__', None):
            return self._get_subfolder('..' if self._url[2].endswith('/')
                                            else '.', self.__parent_type__)
        else:
            raise AttributeError("%r has no parent attribute" % type(self))
717825
def parent(self):
    
    pairs = self.__pairs
    if len(pairs) <= 1:
      return None
    return Key(pairs=pairs[:-1], app=self.__app, namespace=self.__namespace)
801386
def pbt_top_parent
      record = self
      return nil unless record.pbt_parent
      no_repeat = PolyBelongsTo::SingletonSet.new
      while !no_repeat.include?(record.pbt_parent) && !record.pbt_parent.nil?
        no_repeat.add?(record)
        record = record.pbt_parent
      end
      record
    end
208031
def is_parent_of(self, parent, child):
        
        if parent == 'trunk':
            return True
        if child == 'trunk':
            return False
        if child not in self._branches:
            raise ValueError(
                "The branch {} seems not to have ever been created".format(
                    child
                )
            )
        if self._branches[child][0] == parent:
            return True
        return self.is_parent_of(parent, self._branches[child][0])
1373890
def get_parent(parent):
    """"""
    if isinstance(parent, Interface):
        return parent.id
    elif isinstance(parent, int):
        return parent
    else:
        raise TypeError(
            "parent must be an Interface or int, not %s" % (
                type(parent).__name__))
62336
public static boolean useParentheses(int pSelf, int pNested) {
        if (pSelf == PrecedencedSelfDescribing.P_NONE
                || pSelf == PrecedencedSelfDescribing.P_UNARY_NO_PAREN) {
            return false;
        }
        if (pNested < PrecedencedSelfDescribing.P_UNARY) {
            return pNested <= pSelf;
        } else {
            return pNested < pSelf;
        }
    }
23807
def is_parent_of(page1, page2):
    

    try:
        return page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght
    except AttributeError:
        return False
787347
def parent(self, parent):
        
        if parent is None:
            self._parent = None
        else:
            from rafcon.core.states.state import State
            assert isinstance(parent, State)

            old_parent = self.parent
            self._parent = ref(parent)

            valid, message = self._check_validity()
            if not valid:
                if not old_parent:
                    self._parent = None
                else:
                    self._parent = ref(old_parent)

                class_name = self.__class__.__name__
                if global_config.get_config_value("LIBRARY_RECOVERY_MODE") is True:
                    do_delete_item = True
                    # In case of just the data type is wrong raise an Exception but keep the data flow
                    if "not have matching data types" in message:
                        do_delete_item = False
                        self._parent = ref(parent)
                    raise RecoveryModeException("{0} invalid within state \"{1}\" (id {2}): {3}".format(
                        class_name, parent.name, parent.state_id, message), do_delete_item=do_delete_item)
                else:
                    raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} {4}".format(
                        class_name, parent.name, parent.state_id, message, self))
526689
def _handle_parentof(self, node, scope, ctxt, stream):
        
        # if someone does something like parentof(this).blah,
        # we'll end up with a StructRef instead of an ID ref
        # for node.expr, but we'll also end up with a structref
        # if the user does parentof(a.b.c)...
        # 
        # TODO how to differentiate between the two??
        #
        # the proper way would be to do (parentof(a.b.c)).a or
        # (parentof a.b.c).a

        field = self._handle_node(node.expr, scope, ctxt, stream)
        parent = field._pfp__parent
        return parent
254609
function parent(object, path) {
        return path.length == 1 ? object : get(object, baseSlice(path, 0, -1));
      }
1355666
def super(self):
        """"""
        if self._depth + 1 >= len(self._stack):
            return self._context.environment. \
                undefined('there is no parent block called %r.' %
                          self.name, name='super')
        return BlockReference(self.name, self._context, self._stack,
                              self._depth + 1)
869466
def parent(self, key):
        """"""
        parent_key = '.'.join(key.split('.')[:-1])
        if not parent_key:
            return None
        else:
            return self[parent_key]