add() with reordered paameters
3188
def add2(self, target, path_settings, method):
        
        return self.add(method, path_settings, target)
357702
def creation_ordered(class_to_decorate):
    

    next_index = functools.partial(next, itertools.count())

    __init__orig = class_to_decorate.__init__

    @functools.wraps(__init__orig, assigned=['__doc__'])
    def __init__(self, *args, **kwargs):
        object.__setattr__(self, '_index', next_index())
        __init__orig(self, *args, **kwargs)

    setattr(class_to_decorate, '__init__', __init__)

    # noinspection PyProtectedMember
    def __lt__(self, other):
        return self._index < other._index  # pragma: no mutate

    setattr(class_to_decorate, '__lt__', __lt__)

    class_to_decorate = functools.total_ordering(class_to_decorate)

    return class_to_decorate
221687
def append(self, payload):
        
        if self.objType.setInParentPayload:
            print('Error, {} is not elibible to addition, but only set'
                  .format(self.objName))
            return False
        ret = self.api.create("{}/{}/{}".format(self.parentObjName,
                                                self.parentKey,
                                                self.objNameSet),
                              self.getPayloadStruct(payload))
        return ret
1220506
def ordered(self, ord='desc'):
        """"""
        if ord not in ('asc', 'desc', ):
            raise
        ord_f = getattr(PIDRelation.index, ord)()
        return self.order_by(ord_f)
1158682
def reorder(args):
    
    import csv

    p = OptionParser(reorder.__doc__)
    p.set_sep()
    opts, args = p.parse_args(args)

    if len(args) != 2:
        sys.exit(not p.print_help())

    tabfile, order = args
    sep = opts.sep
    order = [int(x) - 1 for x in order.split(",")]
    reader = csv.reader(must_open(tabfile), delimiter=sep)
    writer = csv.writer(sys.stdout, delimiter=sep)
    for row in reader:
        newrow = [row[x] for x in order]
        writer.writerow(newrow)
464396
def append(self, acces, **kwargs):
        
        if acces.Id in set(ac.Id for ac in self):
            raise ValueError("Acces id already in list !")
        list.append(self, acces)
        if kwargs:
            self.infos[acces.Id] = kwargs
14712
private void addFirstOfType() {
		for (Node node : nodes) {
			Index index = helper.getIndexInParent(node, true);
			if (index.index == 0)
				result.add(node);
		}
	}
1122786
def apply_order(self):
    ''''''
    self._ensure_modification_is_safe()

    if len(self.query.orders) > 0:
      self._iterable = Order.sorted(self._iterable, self.query.orders)
621756
def add(self, *args, **kwargs):
        

        check_uniqueness = kwargs.pop('check_uniqueness', False)
        args = self.prepare_args(args)

        for index in self._indexes:
            index.add(*args, check_uniqueness=check_uniqueness and index.handle_uniqueness, **kwargs)
            if check_uniqueness and index.handle_uniqueness:
                check_uniqueness = False
385530
def _append_sorted(root, el, comparator):
    
    for child in root:
        rel = comparator(el, child)
        if rel > 0:
            # el fits inside child, add to child and return
            _append_sorted(child, el, comparator)
            return
        if rel < 0:
            # child fits inside el, move child into el (may move more than one)
            _append_sorted(el, child, comparator)
    # we weren't added to a child, so add to root
    root.append(el)
1137686
def add(self, *args, **kwargs):
        
        return self._apply(operator.add, *args, **kwargs)
22529
function add(/* values... */) {
  var self = this

  self.values.push.apply(self.values, arguments)

  return self
}
437464
def insert(self, index, key, value):
        """"""
        if key in self.keyOrder:
            n = self.keyOrder.index(key)
            del self.keyOrder[n]
            if n < index:
                index -= 1
        self.keyOrder.insert(index, key)
        super(SortedDict, self).__setitem__(key, value)
33466
def add(self, item, position=5):
        
        if item in self.items:
            return
        self.items[item] = position
        self._add_dep(item)
        self.order = None
        self.changed(code_changed=True)
974525
private int appendInternal(DateTimePrinterParser pp) {
        Jdk8Methods.requireNonNull(pp, "pp");
        if (active.padNextWidth > 0) {
            if (pp != null) {
                pp = new PadPrinterParserDecorator(pp, active.padNextWidth, active.padNextChar);
            }
            active.padNextWidth = 0;
            active.padNextChar = 0;
        }
        active.printerParsers.add(pp);
        active.valueParserIndex = -1;
        return active.printerParsers.size() - 1;
    }
490941
private void fillOrder(JsonObject summary) {
    if (summary != null) {
      order = summary.getString("order", order);
    }

    if (order == null && openGraphCommentOrder != null) {
      order = openGraphCommentOrder;
    }
  }
335628
def reorder(self, handle, low_value):
        
        return lib.zlistx_reorder(self._as_parameter_, handle, low_value)