forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.c
More file actions
40 lines (33 loc) · 1.37 KB
/
__init__.c
File metadata and controls
40 lines (33 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2022 Dan Halbert for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#include "extmod/vfs.h"
#include "py/mpstate.h"
#include "py/obj.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "shared-bindings/__future__/__init__.h"
//| """Language features module
//|
//| The `__future__` module is used by other Python implementations to
//| enable forward compatibility for features enabled by default in an upcoming version.
//| """
//|
//| annotations: Any
//| """In CPython, ``from __future__ import annotations``
//| indicates that evaluation of annotations is postponed, as described in PEP 563.
//| CircuitPython (and MicroPython) ignore annotations entirely, whether or not this feature is imported.
//| This is a limitation of CircuitPython and MicroPython for efficiency reasons.
//| """
static const mp_rom_map_elem_t future_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR___future__) },
{ MP_ROM_QSTR(MP_QSTR_annotations), mp_const_true },
};
static MP_DEFINE_CONST_DICT(future_module_globals, future_module_globals_table);
const mp_obj_module_t future_module = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t *)&future_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR___future__, future_module);