Skip to content

Commit f9589d2

Browse files
committed
builtinimport: Fix comment orphaned by one of previous commits.
1 parent deaeaac commit f9589d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

py/builtinimport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ mp_obj_t mp_builtin___import__(uint n_args, mp_obj_t *args) {
313313

314314
if (stat == MP_IMPORT_STAT_DIR) {
315315
DEBUG_printf("%s is dir\n", vstr_str(&path));
316+
// https://docs.python.org/3.3/reference/import.html
317+
// "Specifically, any module that contains a __path__ attribute is considered a package."
316318
mp_store_attr(module_obj, MP_QSTR___path__, mp_obj_new_str((byte*)vstr_str(&path), vstr_len(&path), false));
317319
vstr_add_char(&path, PATH_SEP_CHAR);
318320
vstr_add_str(&path, "__init__.py");
@@ -323,8 +325,6 @@ mp_obj_t mp_builtin___import__(uint n_args, mp_obj_t *args) {
323325
do_load(module_obj, &path);
324326
}
325327
vstr_cut_tail_bytes(&path, sizeof("/__init__.py") - 1); // cut off /__init__.py
326-
// https://docs.python.org/3.3/reference/import.html
327-
// "Specifically, any module that contains a __path__ attribute is considered a package."
328328
} else { // MP_IMPORT_STAT_FILE
329329
do_load(module_obj, &path);
330330
// TODO: We cannot just break here, at the very least, we must execute

0 commit comments

Comments
 (0)