From 2fe4cf7761ffc40d81b4780d59c2b6ef0a5c16ff Mon Sep 17 00:00:00 2001 From: stijn Date: Sat, 4 Oct 2014 08:51:33 +0200 Subject: Implement kwargs for builtin open() and _io.FileIO This makes open() and _io.FileIO() more CPython compliant. The mode kwarg is fully iplemented. The encoding kwarg is allowed but not implemented; mainly to allow the tests to specify encoding for CPython, see #874 --- bare-arm/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bare-arm') diff --git a/bare-arm/main.c b/bare-arm/main.c index 084374d3f..0724f735e 100644 --- a/bare-arm/main.c +++ b/bare-arm/main.c @@ -70,10 +70,10 @@ mp_import_stat_t mp_import_stat(const char *path) { return MP_IMPORT_STAT_NO_EXIST; } -mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args) { +mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) { return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_open_obj, 1, 2, mp_builtin_open); +MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open); void nlr_jump_fail(void *val) { } -- cgit v1.2.3