Remove tupleOf builtin

This commit is contained in:
K. Lange 2022-07-05 11:43:11 +09:00
parent 19927ea13f
commit ebe1b0276e
2 changed files with 3 additions and 2 deletions

View File

@ -315,8 +315,6 @@ void _createAndBind_tupleClass(void) {
krk_defineNative(&tuple->methods, "__str__", FUNC_NAME(tuple,__repr__));
krk_finalizeClass(tuple);
BUILTIN_FUNCTION("tupleOf",krk_tuple_of,"Convert argument sequence to tuple object.");
ADD_BASE_CLASS(vm.baseClasses->tupleiteratorClass, "tupleiterator", vm.baseClasses->objectClass);
vm.baseClasses->tupleiteratorClass->allocSize = sizeof(struct TupleIter);
vm.baseClasses->tupleiteratorClass->_ongcscan = _tuple_iter_gcscan;

View File

@ -11,5 +11,8 @@ print(l)
let l = list(map(list,['test','test','test']))
print(l)
def tupleOf(*args):
return tuple(args)
let l = list(map(tupleOf,['foo','bar'],['baz','bix'],['three','args'],['four','args']))
print(l)