<commit_before>/* Python 'list' type */

var list = __inherit(object);

list.__name__ = 'list';
list.prototype.__class__ = list;
list.prototype.MARK = "list";

list.prototype.__init__ = function(seq) {
    if (!defined(seq)) {
        this._items = [];
        this._len = 0;
    } else {
        this._items = copy(iter.__call__(seq));
        this._len = -1;
    }
};

list.prototype.__str__ = function () {
    return str.__call__("[" + this._items.join(", ") + "]");
};

list.prototype.__eq__ = tuple.prototype.__eq__;

list.prototype.toString = tuple.prototype.toString;

list.prototype._js_ = tuple.prototype._js_;

list.prototype.__len__ = tuple.prototype.__len__;

list.prototype.__iter__ = tuple.prototype.__iter__;

list.prototype.__contains__ = tuple.prototype.__contains__;

list.prototype.__getitem__ = tuple.prototype.__getitem__;

list.prototype.__setitem__ = function(index, value) {
    if ((index >= 0) && (index < len(this)))
        this._items[index] = value;
    else if ((index < 0) && (index >= -len(this)))
        this._items[index+len(this)] = value;
    else
        throw new py_builtins.IndexError("list assignment index out of range");
};
list.prototype.__setslice__ = function(lower, upper, value) {
     var it = list.__call__(value)._items;
     if ( lower < len(this) && upper < len(this)){
       this._items = this._items.slice(0,lower).concat(it).concat(this._items.slice(upper,len(this)));
       this._len = -1;
     }
};

list.prototype.__delitem__ = function(index) {
    if ((index >= 0) && (index < len(this))) {
        var a = this._items.slice(0, index);
        var b = this._items.slice(index+1, len(this));
        this._items = a.concat(b);
        this._len = -1;
    } else
        throw new py_builtins.IndexError("list assignment index out of range");
};

list.prototype.count = tuple.prototype.count;

list.prototype.index = Function(function(value, start, end) {
    if (!defined(start)) {<commit_msg> + Implemented __delslice__ for list type<commit_after>/* Python 'list' type */

var list = __inherit(object);

list.__name__ = 'list';
list.prototype.__class__ = list;
list.prototype.MARK = "list";

list.prototype.__init__ = function(seq) {
    if (!defined(seq)) {
        this._items = [];
        this._len = 0;
    } else {
        this._items = copy(iter.__call__(seq));
        this._len = -1;
    }
};

list.prototype.__str__ = function () {
    return str.__call__("[" + this._items.join(", ") + "]");
};

list.prototype.__eq__ = tuple.prototype.__eq__;

list.prototype.toString = tuple.prototype.toString;

list.prototype._js_ = tuple.prototype._js_;

list.prototype.__len__ = tuple.prototype.__len__;

list.prototype.__iter__ = tuple.prototype.__iter__;

list.prototype.__contains__ = tuple.prototype.__contains__;

list.prototype.__getitem__ = tuple.prototype.__getitem__;

list.prototype.__setitem__ = function(index, value) {
    if ((index >= 0) && (index < len(this)))
        this._items[index] = value;
    else if ((index < 0) && (index >= -len(this)))
        this._items[index+len(this)] = value;
    else
        throw new py_builtins.IndexError("list assignment index out of range");
};
list.prototype.__setslice__ = function(lower, upper, value) {
     var it = list.__call__(value)._items;
     if ( lower < len(this) && upper < len(this)){
       this._items = this._items.slice(0,lower).concat(it).concat(this._items.slice(upper,len(this)));
       this._len = -1;
     }
};

list.prototype.__delitem__ = function(index) {
    if ((index >= 0) && (index < len(this))) {
        var a = this._items.slice(0, index);
        var b = this._items.slice(index+1, len(this));
        this._items = a.concat(b);
        this._len = -1;
    } else
        throw new py_builtins.IndexError("list assignment index out of range");
};

list.prototype.__delslice__ = function(x, y) {
    if ((x >= 0) && (y < len(this))) {
        var a = this._items.slice(0, x);
        var b = this._items.slice(y+1, len(this));
        this._items = a.concat(b);
        this._len = -1;
    } else
        throw new py_builtins.IndexError("list assignment index out of range");
};

list.prototype.count = tuple.prototype.count;

list.prototype.index = Function(function(value, start, end) {
    if (!defined(start)) {
{'fraction_non_alphanumeric': 0.1627689429373246, 'fraction_numerical': 0.005612722170252572, 'mean_word_length': 3.193137254901961, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7284560', 'n_tokens_mistral': 1385, 'n_tokens_neox': 1377, 'n_words': 280}