python-datamodel 0.10.1__cp313-cp313-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datamodel/__init__.py +13 -0
- datamodel/abstract.py +383 -0
- datamodel/adaptive/__init__.py +0 -0
- datamodel/adaptive/models.py +598 -0
- datamodel/aliases/__init__.py +26 -0
- datamodel/base.py +180 -0
- datamodel/converters.c +43471 -0
- datamodel/converters.cp313-win32.pyd +0 -0
- datamodel/converters.html +17387 -0
- datamodel/converters.pyx +1489 -0
- datamodel/exceptions.c +13455 -0
- datamodel/exceptions.cp313-win32.pyd +0 -0
- datamodel/exceptions.html +1261 -0
- datamodel/exceptions.pxd +13 -0
- datamodel/exceptions.pyx +50 -0
- datamodel/fields.cp313-win32.pyd +0 -0
- datamodel/fields.cpp +17401 -0
- datamodel/fields.html +3912 -0
- datamodel/fields.pyx +309 -0
- datamodel/functions.cp313-win32.pyd +0 -0
- datamodel/functions.cpp +9068 -0
- datamodel/functions.html +1766 -0
- datamodel/functions.pxd +9 -0
- datamodel/functions.pyx +82 -0
- datamodel/jsonld/__init__.py +45 -0
- datamodel/jsonld/models.py +500 -0
- datamodel/libs/__init__.py +1 -0
- datamodel/libs/mapping.c +15067 -0
- datamodel/libs/mapping.cp313-win32.pyd +0 -0
- datamodel/libs/mapping.html +2618 -0
- datamodel/libs/mapping.pxd +11 -0
- datamodel/libs/mapping.pyx +135 -0
- datamodel/libs/mutables.py +127 -0
- datamodel/models.py +814 -0
- datamodel/parsers/__init__.py +0 -0
- datamodel/parsers/encoders.py +15 -0
- datamodel/parsers/json.cp313-win32.pyd +0 -0
- datamodel/parsers/json.cpp +17004 -0
- datamodel/parsers/json.html +3365 -0
- datamodel/parsers/json.pyx +250 -0
- datamodel/profiler.py +21 -0
- datamodel/py.typed +0 -0
- datamodel/rs_core/Cargo.toml +17 -0
- datamodel/rs_core/src/lib.rs +294 -0
- datamodel/rs_parsers/Cargo.toml +22 -0
- datamodel/rs_parsers/src/lib.rs +571 -0
- datamodel/rs_parsers.cp313-win32.pyd +0 -0
- datamodel/rs_validators/Cargo.toml +17 -0
- datamodel/rs_validators/src/lib.rs +0 -0
- datamodel/typedefs/__init__.py +9 -0
- datamodel/typedefs/singleton.c +9169 -0
- datamodel/typedefs/singleton.cp313-win32.pyd +0 -0
- datamodel/typedefs/singleton.html +629 -0
- datamodel/typedefs/singleton.pxd +9 -0
- datamodel/typedefs/singleton.pyx +24 -0
- datamodel/typedefs/types.c +11716 -0
- datamodel/typedefs/types.cp313-win32.pyd +0 -0
- datamodel/typedefs/types.html +732 -0
- datamodel/typedefs/types.pxd +11 -0
- datamodel/typedefs/types.pyx +39 -0
- datamodel/types.c +7165 -0
- datamodel/types.cp313-win32.pyd +0 -0
- datamodel/types.html +716 -0
- datamodel/types.pyx +100 -0
- datamodel/validation.cp313-win32.pyd +0 -0
- datamodel/validation.cpp +17085 -0
- datamodel/validation.html +4769 -0
- datamodel/validation.pyx +315 -0
- datamodel/version.py +13 -0
- examples/nn/examples.py +311 -0
- examples/nn/stores.py +151 -0
- examples/tests/sp_types.py +294 -0
- examples/tests/speed_dates.py +26 -0
- python_datamodel-0.10.1.dist-info/LICENSE +29 -0
- python_datamodel-0.10.1.dist-info/METADATA +320 -0
- python_datamodel-0.10.1.dist-info/RECORD +78 -0
- python_datamodel-0.10.1.dist-info/WHEEL +5 -0
- python_datamodel-0.10.1.dist-info/top_level.txt +7 -0
|
@@ -0,0 +1,2618 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!-- Generated by Cython 3.0.11 -->
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>Cython: mapping.pyx</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
body.cython { font-family: courier; font-size: 12; }
|
|
10
|
+
|
|
11
|
+
.cython.tag { }
|
|
12
|
+
.cython.line { color: #000000; margin: 0em }
|
|
13
|
+
.cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; }
|
|
14
|
+
|
|
15
|
+
.cython.line .run { background-color: #B0FFB0; }
|
|
16
|
+
.cython.line .mis { background-color: #FFB0B0; }
|
|
17
|
+
.cython.code.run { border-left: 8px solid #B0FFB0; }
|
|
18
|
+
.cython.code.mis { border-left: 8px solid #FFB0B0; }
|
|
19
|
+
|
|
20
|
+
.cython.code .py_c_api { color: red; }
|
|
21
|
+
.cython.code .py_macro_api { color: #FF7000; }
|
|
22
|
+
.cython.code .pyx_c_api { color: #FF3000; }
|
|
23
|
+
.cython.code .pyx_macro_api { color: #FF7000; }
|
|
24
|
+
.cython.code .refnanny { color: #FFA000; }
|
|
25
|
+
.cython.code .trace { color: #FFA000; }
|
|
26
|
+
.cython.code .error_goto { color: #FFA000; }
|
|
27
|
+
|
|
28
|
+
.cython.code .coerce { color: #008000; border: 1px dotted #008000 }
|
|
29
|
+
.cython.code .py_attr { color: #FF0000; font-weight: bold; }
|
|
30
|
+
.cython.code .c_attr { color: #0000FF; }
|
|
31
|
+
.cython.code .py_call { color: #FF0000; font-weight: bold; }
|
|
32
|
+
.cython.code .c_call { color: #0000FF; }
|
|
33
|
+
|
|
34
|
+
.cython.score-0 {background-color: #FFFFff;}
|
|
35
|
+
.cython.score-1 {background-color: #FFFFe7;}
|
|
36
|
+
.cython.score-2 {background-color: #FFFFd4;}
|
|
37
|
+
.cython.score-3 {background-color: #FFFFc4;}
|
|
38
|
+
.cython.score-4 {background-color: #FFFFb6;}
|
|
39
|
+
.cython.score-5 {background-color: #FFFFaa;}
|
|
40
|
+
.cython.score-6 {background-color: #FFFF9f;}
|
|
41
|
+
.cython.score-7 {background-color: #FFFF96;}
|
|
42
|
+
.cython.score-8 {background-color: #FFFF8d;}
|
|
43
|
+
.cython.score-9 {background-color: #FFFF86;}
|
|
44
|
+
.cython.score-10 {background-color: #FFFF7f;}
|
|
45
|
+
.cython.score-11 {background-color: #FFFF79;}
|
|
46
|
+
.cython.score-12 {background-color: #FFFF73;}
|
|
47
|
+
.cython.score-13 {background-color: #FFFF6e;}
|
|
48
|
+
.cython.score-14 {background-color: #FFFF6a;}
|
|
49
|
+
.cython.score-15 {background-color: #FFFF66;}
|
|
50
|
+
.cython.score-16 {background-color: #FFFF62;}
|
|
51
|
+
.cython.score-17 {background-color: #FFFF5e;}
|
|
52
|
+
.cython.score-18 {background-color: #FFFF5b;}
|
|
53
|
+
.cython.score-19 {background-color: #FFFF57;}
|
|
54
|
+
.cython.score-20 {background-color: #FFFF55;}
|
|
55
|
+
.cython.score-21 {background-color: #FFFF52;}
|
|
56
|
+
.cython.score-22 {background-color: #FFFF4f;}
|
|
57
|
+
.cython.score-23 {background-color: #FFFF4d;}
|
|
58
|
+
.cython.score-24 {background-color: #FFFF4b;}
|
|
59
|
+
.cython.score-25 {background-color: #FFFF48;}
|
|
60
|
+
.cython.score-26 {background-color: #FFFF46;}
|
|
61
|
+
.cython.score-27 {background-color: #FFFF44;}
|
|
62
|
+
.cython.score-28 {background-color: #FFFF43;}
|
|
63
|
+
.cython.score-29 {background-color: #FFFF41;}
|
|
64
|
+
.cython.score-30 {background-color: #FFFF3f;}
|
|
65
|
+
.cython.score-31 {background-color: #FFFF3e;}
|
|
66
|
+
.cython.score-32 {background-color: #FFFF3c;}
|
|
67
|
+
.cython.score-33 {background-color: #FFFF3b;}
|
|
68
|
+
.cython.score-34 {background-color: #FFFF39;}
|
|
69
|
+
.cython.score-35 {background-color: #FFFF38;}
|
|
70
|
+
.cython.score-36 {background-color: #FFFF37;}
|
|
71
|
+
.cython.score-37 {background-color: #FFFF36;}
|
|
72
|
+
.cython.score-38 {background-color: #FFFF35;}
|
|
73
|
+
.cython.score-39 {background-color: #FFFF34;}
|
|
74
|
+
.cython.score-40 {background-color: #FFFF33;}
|
|
75
|
+
.cython.score-41 {background-color: #FFFF32;}
|
|
76
|
+
.cython.score-42 {background-color: #FFFF31;}
|
|
77
|
+
.cython.score-43 {background-color: #FFFF30;}
|
|
78
|
+
.cython.score-44 {background-color: #FFFF2f;}
|
|
79
|
+
.cython.score-45 {background-color: #FFFF2e;}
|
|
80
|
+
.cython.score-46 {background-color: #FFFF2d;}
|
|
81
|
+
.cython.score-47 {background-color: #FFFF2c;}
|
|
82
|
+
.cython.score-48 {background-color: #FFFF2b;}
|
|
83
|
+
.cython.score-49 {background-color: #FFFF2b;}
|
|
84
|
+
.cython.score-50 {background-color: #FFFF2a;}
|
|
85
|
+
.cython.score-51 {background-color: #FFFF29;}
|
|
86
|
+
.cython.score-52 {background-color: #FFFF29;}
|
|
87
|
+
.cython.score-53 {background-color: #FFFF28;}
|
|
88
|
+
.cython.score-54 {background-color: #FFFF27;}
|
|
89
|
+
.cython.score-55 {background-color: #FFFF27;}
|
|
90
|
+
.cython.score-56 {background-color: #FFFF26;}
|
|
91
|
+
.cython.score-57 {background-color: #FFFF26;}
|
|
92
|
+
.cython.score-58 {background-color: #FFFF25;}
|
|
93
|
+
.cython.score-59 {background-color: #FFFF24;}
|
|
94
|
+
.cython.score-60 {background-color: #FFFF24;}
|
|
95
|
+
.cython.score-61 {background-color: #FFFF23;}
|
|
96
|
+
.cython.score-62 {background-color: #FFFF23;}
|
|
97
|
+
.cython.score-63 {background-color: #FFFF22;}
|
|
98
|
+
.cython.score-64 {background-color: #FFFF22;}
|
|
99
|
+
.cython.score-65 {background-color: #FFFF22;}
|
|
100
|
+
.cython.score-66 {background-color: #FFFF21;}
|
|
101
|
+
.cython.score-67 {background-color: #FFFF21;}
|
|
102
|
+
.cython.score-68 {background-color: #FFFF20;}
|
|
103
|
+
.cython.score-69 {background-color: #FFFF20;}
|
|
104
|
+
.cython.score-70 {background-color: #FFFF1f;}
|
|
105
|
+
.cython.score-71 {background-color: #FFFF1f;}
|
|
106
|
+
.cython.score-72 {background-color: #FFFF1f;}
|
|
107
|
+
.cython.score-73 {background-color: #FFFF1e;}
|
|
108
|
+
.cython.score-74 {background-color: #FFFF1e;}
|
|
109
|
+
.cython.score-75 {background-color: #FFFF1e;}
|
|
110
|
+
.cython.score-76 {background-color: #FFFF1d;}
|
|
111
|
+
.cython.score-77 {background-color: #FFFF1d;}
|
|
112
|
+
.cython.score-78 {background-color: #FFFF1c;}
|
|
113
|
+
.cython.score-79 {background-color: #FFFF1c;}
|
|
114
|
+
.cython.score-80 {background-color: #FFFF1c;}
|
|
115
|
+
.cython.score-81 {background-color: #FFFF1c;}
|
|
116
|
+
.cython.score-82 {background-color: #FFFF1b;}
|
|
117
|
+
.cython.score-83 {background-color: #FFFF1b;}
|
|
118
|
+
.cython.score-84 {background-color: #FFFF1b;}
|
|
119
|
+
.cython.score-85 {background-color: #FFFF1a;}
|
|
120
|
+
.cython.score-86 {background-color: #FFFF1a;}
|
|
121
|
+
.cython.score-87 {background-color: #FFFF1a;}
|
|
122
|
+
.cython.score-88 {background-color: #FFFF1a;}
|
|
123
|
+
.cython.score-89 {background-color: #FFFF19;}
|
|
124
|
+
.cython.score-90 {background-color: #FFFF19;}
|
|
125
|
+
.cython.score-91 {background-color: #FFFF19;}
|
|
126
|
+
.cython.score-92 {background-color: #FFFF19;}
|
|
127
|
+
.cython.score-93 {background-color: #FFFF18;}
|
|
128
|
+
.cython.score-94 {background-color: #FFFF18;}
|
|
129
|
+
.cython.score-95 {background-color: #FFFF18;}
|
|
130
|
+
.cython.score-96 {background-color: #FFFF18;}
|
|
131
|
+
.cython.score-97 {background-color: #FFFF17;}
|
|
132
|
+
.cython.score-98 {background-color: #FFFF17;}
|
|
133
|
+
.cython.score-99 {background-color: #FFFF17;}
|
|
134
|
+
.cython.score-100 {background-color: #FFFF17;}
|
|
135
|
+
.cython.score-101 {background-color: #FFFF16;}
|
|
136
|
+
.cython.score-102 {background-color: #FFFF16;}
|
|
137
|
+
.cython.score-103 {background-color: #FFFF16;}
|
|
138
|
+
.cython.score-104 {background-color: #FFFF16;}
|
|
139
|
+
.cython.score-105 {background-color: #FFFF16;}
|
|
140
|
+
.cython.score-106 {background-color: #FFFF15;}
|
|
141
|
+
.cython.score-107 {background-color: #FFFF15;}
|
|
142
|
+
.cython.score-108 {background-color: #FFFF15;}
|
|
143
|
+
.cython.score-109 {background-color: #FFFF15;}
|
|
144
|
+
.cython.score-110 {background-color: #FFFF15;}
|
|
145
|
+
.cython.score-111 {background-color: #FFFF15;}
|
|
146
|
+
.cython.score-112 {background-color: #FFFF14;}
|
|
147
|
+
.cython.score-113 {background-color: #FFFF14;}
|
|
148
|
+
.cython.score-114 {background-color: #FFFF14;}
|
|
149
|
+
.cython.score-115 {background-color: #FFFF14;}
|
|
150
|
+
.cython.score-116 {background-color: #FFFF14;}
|
|
151
|
+
.cython.score-117 {background-color: #FFFF14;}
|
|
152
|
+
.cython.score-118 {background-color: #FFFF13;}
|
|
153
|
+
.cython.score-119 {background-color: #FFFF13;}
|
|
154
|
+
.cython.score-120 {background-color: #FFFF13;}
|
|
155
|
+
.cython.score-121 {background-color: #FFFF13;}
|
|
156
|
+
.cython.score-122 {background-color: #FFFF13;}
|
|
157
|
+
.cython.score-123 {background-color: #FFFF13;}
|
|
158
|
+
.cython.score-124 {background-color: #FFFF13;}
|
|
159
|
+
.cython.score-125 {background-color: #FFFF12;}
|
|
160
|
+
.cython.score-126 {background-color: #FFFF12;}
|
|
161
|
+
.cython.score-127 {background-color: #FFFF12;}
|
|
162
|
+
.cython.score-128 {background-color: #FFFF12;}
|
|
163
|
+
.cython.score-129 {background-color: #FFFF12;}
|
|
164
|
+
.cython.score-130 {background-color: #FFFF12;}
|
|
165
|
+
.cython.score-131 {background-color: #FFFF12;}
|
|
166
|
+
.cython.score-132 {background-color: #FFFF11;}
|
|
167
|
+
.cython.score-133 {background-color: #FFFF11;}
|
|
168
|
+
.cython.score-134 {background-color: #FFFF11;}
|
|
169
|
+
.cython.score-135 {background-color: #FFFF11;}
|
|
170
|
+
.cython.score-136 {background-color: #FFFF11;}
|
|
171
|
+
.cython.score-137 {background-color: #FFFF11;}
|
|
172
|
+
.cython.score-138 {background-color: #FFFF11;}
|
|
173
|
+
.cython.score-139 {background-color: #FFFF11;}
|
|
174
|
+
.cython.score-140 {background-color: #FFFF11;}
|
|
175
|
+
.cython.score-141 {background-color: #FFFF10;}
|
|
176
|
+
.cython.score-142 {background-color: #FFFF10;}
|
|
177
|
+
.cython.score-143 {background-color: #FFFF10;}
|
|
178
|
+
.cython.score-144 {background-color: #FFFF10;}
|
|
179
|
+
.cython.score-145 {background-color: #FFFF10;}
|
|
180
|
+
.cython.score-146 {background-color: #FFFF10;}
|
|
181
|
+
.cython.score-147 {background-color: #FFFF10;}
|
|
182
|
+
.cython.score-148 {background-color: #FFFF10;}
|
|
183
|
+
.cython.score-149 {background-color: #FFFF10;}
|
|
184
|
+
.cython.score-150 {background-color: #FFFF0f;}
|
|
185
|
+
.cython.score-151 {background-color: #FFFF0f;}
|
|
186
|
+
.cython.score-152 {background-color: #FFFF0f;}
|
|
187
|
+
.cython.score-153 {background-color: #FFFF0f;}
|
|
188
|
+
.cython.score-154 {background-color: #FFFF0f;}
|
|
189
|
+
.cython.score-155 {background-color: #FFFF0f;}
|
|
190
|
+
.cython.score-156 {background-color: #FFFF0f;}
|
|
191
|
+
.cython.score-157 {background-color: #FFFF0f;}
|
|
192
|
+
.cython.score-158 {background-color: #FFFF0f;}
|
|
193
|
+
.cython.score-159 {background-color: #FFFF0f;}
|
|
194
|
+
.cython.score-160 {background-color: #FFFF0f;}
|
|
195
|
+
.cython.score-161 {background-color: #FFFF0e;}
|
|
196
|
+
.cython.score-162 {background-color: #FFFF0e;}
|
|
197
|
+
.cython.score-163 {background-color: #FFFF0e;}
|
|
198
|
+
.cython.score-164 {background-color: #FFFF0e;}
|
|
199
|
+
.cython.score-165 {background-color: #FFFF0e;}
|
|
200
|
+
.cython.score-166 {background-color: #FFFF0e;}
|
|
201
|
+
.cython.score-167 {background-color: #FFFF0e;}
|
|
202
|
+
.cython.score-168 {background-color: #FFFF0e;}
|
|
203
|
+
.cython.score-169 {background-color: #FFFF0e;}
|
|
204
|
+
.cython.score-170 {background-color: #FFFF0e;}
|
|
205
|
+
.cython.score-171 {background-color: #FFFF0e;}
|
|
206
|
+
.cython.score-172 {background-color: #FFFF0e;}
|
|
207
|
+
.cython.score-173 {background-color: #FFFF0d;}
|
|
208
|
+
.cython.score-174 {background-color: #FFFF0d;}
|
|
209
|
+
.cython.score-175 {background-color: #FFFF0d;}
|
|
210
|
+
.cython.score-176 {background-color: #FFFF0d;}
|
|
211
|
+
.cython.score-177 {background-color: #FFFF0d;}
|
|
212
|
+
.cython.score-178 {background-color: #FFFF0d;}
|
|
213
|
+
.cython.score-179 {background-color: #FFFF0d;}
|
|
214
|
+
.cython.score-180 {background-color: #FFFF0d;}
|
|
215
|
+
.cython.score-181 {background-color: #FFFF0d;}
|
|
216
|
+
.cython.score-182 {background-color: #FFFF0d;}
|
|
217
|
+
.cython.score-183 {background-color: #FFFF0d;}
|
|
218
|
+
.cython.score-184 {background-color: #FFFF0d;}
|
|
219
|
+
.cython.score-185 {background-color: #FFFF0d;}
|
|
220
|
+
.cython.score-186 {background-color: #FFFF0d;}
|
|
221
|
+
.cython.score-187 {background-color: #FFFF0c;}
|
|
222
|
+
.cython.score-188 {background-color: #FFFF0c;}
|
|
223
|
+
.cython.score-189 {background-color: #FFFF0c;}
|
|
224
|
+
.cython.score-190 {background-color: #FFFF0c;}
|
|
225
|
+
.cython.score-191 {background-color: #FFFF0c;}
|
|
226
|
+
.cython.score-192 {background-color: #FFFF0c;}
|
|
227
|
+
.cython.score-193 {background-color: #FFFF0c;}
|
|
228
|
+
.cython.score-194 {background-color: #FFFF0c;}
|
|
229
|
+
.cython.score-195 {background-color: #FFFF0c;}
|
|
230
|
+
.cython.score-196 {background-color: #FFFF0c;}
|
|
231
|
+
.cython.score-197 {background-color: #FFFF0c;}
|
|
232
|
+
.cython.score-198 {background-color: #FFFF0c;}
|
|
233
|
+
.cython.score-199 {background-color: #FFFF0c;}
|
|
234
|
+
.cython.score-200 {background-color: #FFFF0c;}
|
|
235
|
+
.cython.score-201 {background-color: #FFFF0c;}
|
|
236
|
+
.cython.score-202 {background-color: #FFFF0c;}
|
|
237
|
+
.cython.score-203 {background-color: #FFFF0b;}
|
|
238
|
+
.cython.score-204 {background-color: #FFFF0b;}
|
|
239
|
+
.cython.score-205 {background-color: #FFFF0b;}
|
|
240
|
+
.cython.score-206 {background-color: #FFFF0b;}
|
|
241
|
+
.cython.score-207 {background-color: #FFFF0b;}
|
|
242
|
+
.cython.score-208 {background-color: #FFFF0b;}
|
|
243
|
+
.cython.score-209 {background-color: #FFFF0b;}
|
|
244
|
+
.cython.score-210 {background-color: #FFFF0b;}
|
|
245
|
+
.cython.score-211 {background-color: #FFFF0b;}
|
|
246
|
+
.cython.score-212 {background-color: #FFFF0b;}
|
|
247
|
+
.cython.score-213 {background-color: #FFFF0b;}
|
|
248
|
+
.cython.score-214 {background-color: #FFFF0b;}
|
|
249
|
+
.cython.score-215 {background-color: #FFFF0b;}
|
|
250
|
+
.cython.score-216 {background-color: #FFFF0b;}
|
|
251
|
+
.cython.score-217 {background-color: #FFFF0b;}
|
|
252
|
+
.cython.score-218 {background-color: #FFFF0b;}
|
|
253
|
+
.cython.score-219 {background-color: #FFFF0b;}
|
|
254
|
+
.cython.score-220 {background-color: #FFFF0b;}
|
|
255
|
+
.cython.score-221 {background-color: #FFFF0b;}
|
|
256
|
+
.cython.score-222 {background-color: #FFFF0a;}
|
|
257
|
+
.cython.score-223 {background-color: #FFFF0a;}
|
|
258
|
+
.cython.score-224 {background-color: #FFFF0a;}
|
|
259
|
+
.cython.score-225 {background-color: #FFFF0a;}
|
|
260
|
+
.cython.score-226 {background-color: #FFFF0a;}
|
|
261
|
+
.cython.score-227 {background-color: #FFFF0a;}
|
|
262
|
+
.cython.score-228 {background-color: #FFFF0a;}
|
|
263
|
+
.cython.score-229 {background-color: #FFFF0a;}
|
|
264
|
+
.cython.score-230 {background-color: #FFFF0a;}
|
|
265
|
+
.cython.score-231 {background-color: #FFFF0a;}
|
|
266
|
+
.cython.score-232 {background-color: #FFFF0a;}
|
|
267
|
+
.cython.score-233 {background-color: #FFFF0a;}
|
|
268
|
+
.cython.score-234 {background-color: #FFFF0a;}
|
|
269
|
+
.cython.score-235 {background-color: #FFFF0a;}
|
|
270
|
+
.cython.score-236 {background-color: #FFFF0a;}
|
|
271
|
+
.cython.score-237 {background-color: #FFFF0a;}
|
|
272
|
+
.cython.score-238 {background-color: #FFFF0a;}
|
|
273
|
+
.cython.score-239 {background-color: #FFFF0a;}
|
|
274
|
+
.cython.score-240 {background-color: #FFFF0a;}
|
|
275
|
+
.cython.score-241 {background-color: #FFFF0a;}
|
|
276
|
+
.cython.score-242 {background-color: #FFFF0a;}
|
|
277
|
+
.cython.score-243 {background-color: #FFFF0a;}
|
|
278
|
+
.cython.score-244 {background-color: #FFFF0a;}
|
|
279
|
+
.cython.score-245 {background-color: #FFFF0a;}
|
|
280
|
+
.cython.score-246 {background-color: #FFFF09;}
|
|
281
|
+
.cython.score-247 {background-color: #FFFF09;}
|
|
282
|
+
.cython.score-248 {background-color: #FFFF09;}
|
|
283
|
+
.cython.score-249 {background-color: #FFFF09;}
|
|
284
|
+
.cython.score-250 {background-color: #FFFF09;}
|
|
285
|
+
.cython.score-251 {background-color: #FFFF09;}
|
|
286
|
+
.cython.score-252 {background-color: #FFFF09;}
|
|
287
|
+
.cython.score-253 {background-color: #FFFF09;}
|
|
288
|
+
.cython.score-254 {background-color: #FFFF09;}
|
|
289
|
+
</style>
|
|
290
|
+
</head>
|
|
291
|
+
<body class="cython">
|
|
292
|
+
<p><span style="border-bottom: solid 1px grey;">Generated by Cython 3.0.11</span></p>
|
|
293
|
+
<p>
|
|
294
|
+
<span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br />
|
|
295
|
+
Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it.
|
|
296
|
+
</p>
|
|
297
|
+
<p>Raw output: <a href="mapping.c">mapping.c</a></p>
|
|
298
|
+
<div class="cython"><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">001</span>: # cython: language_level=3, embedsignature=True, boundscheck=False, wraparound=False, initializedcheck=False</pre>
|
|
299
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
300
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
301
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span>
|
|
302
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
303
|
+
</pre><pre class="cython line score-0"> <span class="">002</span>: # Copyright (C) 2018-present Jesus Lara</pre>
|
|
304
|
+
<pre class="cython line score-0"> <span class="">003</span>: #</pre>
|
|
305
|
+
<pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">004</span>: import sys</pre>
|
|
306
|
+
<pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportDottedModule</span>(__pyx_n_s_sys, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)</span>
|
|
307
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
308
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 4, __pyx_L1_error)</span>
|
|
309
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
310
|
+
</pre><pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">005</span>: from typing import Optional, Union, Any</pre>
|
|
311
|
+
<pre class='cython code score-42 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
312
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
313
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Optional);
|
|
314
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Optional);
|
|
315
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_Optional)) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>;
|
|
316
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Union);
|
|
317
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Union);
|
|
318
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 1, __pyx_n_s_Union)) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>;
|
|
319
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Any);
|
|
320
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Any);
|
|
321
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 2, __pyx_n_s_Any)) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>;
|
|
322
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_typing, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
323
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
324
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
325
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_Optional);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
326
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
327
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Optional, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
328
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
329
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_Union);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
330
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
331
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Union, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
332
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
333
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_Any);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
334
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
335
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Any, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 5, __pyx_L1_error)</span>
|
|
336
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
337
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
338
|
+
</pre><pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">006</span>: from collections.abc import Iterator, Iterable</pre>
|
|
339
|
+
<pre class='cython code score-31 '> __pyx_t_3 = <span class='py_c_api'>PyList_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
340
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
341
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Iterator);
|
|
342
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Iterator);
|
|
343
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 0, __pyx_n_s_Iterator)) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>;
|
|
344
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Iterable);
|
|
345
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Iterable);
|
|
346
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 1, __pyx_n_s_Iterable)) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>;
|
|
347
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_collections_abc, __pyx_t_3, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
348
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
349
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
350
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Iterator);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
351
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
352
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Iterator, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
353
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
354
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Iterable);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
355
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
356
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Iterable, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 6, __pyx_L1_error)</span>
|
|
357
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
358
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
359
|
+
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">007</span>: if sys.version_info < (3, 10):</pre>
|
|
360
|
+
<pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_sys);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
361
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
362
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_version_info);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
363
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
364
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
365
|
+
__pyx_t_2 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_t_3, __pyx_tuple__7, Py_LT); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
366
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
367
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) <span class='error_goto'>__PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
368
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
369
|
+
if (__pyx_t_4) {
|
|
370
|
+
/* … */
|
|
371
|
+
goto __pyx_L2;
|
|
372
|
+
}
|
|
373
|
+
/* … */
|
|
374
|
+
__pyx_tuple__7 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_int_3, __pyx_int_10);<span class='error_goto'> if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 7, __pyx_L1_error)</span>
|
|
375
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__7);
|
|
376
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__7);
|
|
377
|
+
</pre><pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">008</span>: from typing_extensions import ParamSpec, TypedDict, get_type_hints</pre>
|
|
378
|
+
<pre class='cython code score-42 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
379
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
380
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_ParamSpec);
|
|
381
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_ParamSpec);
|
|
382
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_ParamSpec)) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>;
|
|
383
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_TypedDict);
|
|
384
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_TypedDict);
|
|
385
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 1, __pyx_n_s_TypedDict)) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>;
|
|
386
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_get_type_hints);
|
|
387
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_get_type_hints);
|
|
388
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_2, 2, __pyx_n_s_get_type_hints)) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>;
|
|
389
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_typing_extensions, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
390
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
391
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
392
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_ParamSpec);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
393
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
394
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_ParamSpec, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
395
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
396
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_TypedDict);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
397
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
398
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_TypedDict, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
399
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
400
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_get_type_hints);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
401
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
402
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_get_type_hints, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 8, __pyx_L1_error)</span>
|
|
403
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
404
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
405
|
+
</pre><pre class="cython line score-0"> <span class="">009</span>: else:</pre>
|
|
406
|
+
<pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">010</span>: from typing import ParamSpec, TypedDict</pre>
|
|
407
|
+
<pre class='cython code score-31 '> /*else*/ {
|
|
408
|
+
__pyx_t_3 = <span class='py_c_api'>PyList_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
409
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
410
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_ParamSpec);
|
|
411
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_ParamSpec);
|
|
412
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 0, __pyx_n_s_ParamSpec)) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>;
|
|
413
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_TypedDict);
|
|
414
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_TypedDict);
|
|
415
|
+
if (<span class='pyx_c_api'>__Pyx_PyList_SET_ITEM</span>(__pyx_t_3, 1, __pyx_n_s_TypedDict)) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>;
|
|
416
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_typing, __pyx_t_3, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
417
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
418
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
419
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_ParamSpec);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
420
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
421
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_ParamSpec, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
422
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
423
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_TypedDict);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
424
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
425
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_TypedDict, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 10, __pyx_L1_error)</span>
|
|
426
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
427
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
428
|
+
}
|
|
429
|
+
__pyx_L2:;
|
|
430
|
+
</pre><pre class="cython line score-0"> <span class="">011</span>: </pre>
|
|
431
|
+
<pre class="cython line score-0"> <span class="">012</span>: </pre>
|
|
432
|
+
<pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">013</span>: P = ParamSpec("P")</pre>
|
|
433
|
+
<pre class='cython code score-16 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_ParamSpec);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
434
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
435
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_tuple__8, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
436
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
437
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
438
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_P, __pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
439
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
440
|
+
/* … */
|
|
441
|
+
__pyx_tuple__8 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_u_P);<span class='error_goto'> if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 13, __pyx_L1_error)</span>
|
|
442
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__8);
|
|
443
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__8);
|
|
444
|
+
</pre><pre class="cython line score-0"> <span class="">014</span>: </pre>
|
|
445
|
+
<pre class="cython line score-0"> <span class="">015</span>: </pre>
|
|
446
|
+
<pre class="cython line score-0"> <span class="">016</span>: cdef class ClassDict(dict):</pre>
|
|
447
|
+
<pre class="cython line score-0"> <span class="">017</span>: """</pre>
|
|
448
|
+
<pre class="cython line score-0"> <span class="">018</span>: ClassDict is a dictionary that allows to access keys as attributes</pre>
|
|
449
|
+
<pre class="cython line score-0"> <span class="">019</span>: """</pre>
|
|
450
|
+
<pre class="cython line score-24" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">020</span>: def __cinit__(</pre>
|
|
451
|
+
<pre class='cython code score-24 '>/* Python wrapper */
|
|
452
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
|
|
453
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
|
|
454
|
+
PyObject *__pyx_v_data = 0;
|
|
455
|
+
PyObject *__pyx_v_default = 0;
|
|
456
|
+
PyObject *__pyx_v_args = 0;
|
|
457
|
+
PyObject *__pyx_v_kwargs = 0;
|
|
458
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
459
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
460
|
+
int __pyx_r;
|
|
461
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
462
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__cinit__ (wrapper)", 0);
|
|
463
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
464
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
465
|
+
#else
|
|
466
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
|
|
467
|
+
#endif
|
|
468
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
469
|
+
__pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return -1;
|
|
470
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs);
|
|
471
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_args);
|
|
472
|
+
__pyx_v_args = __pyx_args;
|
|
473
|
+
{
|
|
474
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_default,0};
|
|
475
|
+
PyObject* values[2] = {0,0};
|
|
476
|
+
/* … */
|
|
477
|
+
/* function exit code */
|
|
478
|
+
goto __pyx_L0;
|
|
479
|
+
__pyx_L1_error:;
|
|
480
|
+
__pyx_r = -1;
|
|
481
|
+
__pyx_L0:;
|
|
482
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_args);
|
|
483
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs);
|
|
484
|
+
{
|
|
485
|
+
Py_ssize_t __pyx_temp;
|
|
486
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
487
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
491
|
+
return __pyx_r;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
static int __pyx_pf_9datamodel_4libs_7mapping_9ClassDict___cinit__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_default, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
|
|
495
|
+
int __pyx_r;
|
|
496
|
+
/* … */
|
|
497
|
+
/* function exit code */
|
|
498
|
+
__pyx_r = 0;
|
|
499
|
+
goto __pyx_L0;
|
|
500
|
+
__pyx_L1_error:;
|
|
501
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
502
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
503
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
504
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
505
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
506
|
+
__pyx_r = -1;
|
|
507
|
+
__pyx_L0:;
|
|
508
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
509
|
+
return __pyx_r;
|
|
510
|
+
}
|
|
511
|
+
</pre><pre class="cython line score-0"> <span class="">021</span>: self,</pre>
|
|
512
|
+
<pre class="cython line score-0"> <span class="">022</span>: *args: P.args,</pre>
|
|
513
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">023</span>: data: Optional[dict]=None,</pre>
|
|
514
|
+
<pre class='cython code score-2 '> values[0] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(((PyObject*)Py_None));
|
|
515
|
+
</pre><pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">024</span>: default: Optional[Union[list,dict]]=None,</pre>
|
|
516
|
+
<pre class='cython code score-25 '> values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(((PyObject *)Py_None));
|
|
517
|
+
if (__pyx_kwds) {
|
|
518
|
+
Py_ssize_t kw_args;
|
|
519
|
+
switch (__pyx_nargs) {
|
|
520
|
+
default:
|
|
521
|
+
case 0: break;
|
|
522
|
+
}
|
|
523
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_VARARGS</span>(__pyx_kwds);
|
|
524
|
+
if (kw_args > 0 && (kw_args <= 2)) {
|
|
525
|
+
Py_ssize_t index;
|
|
526
|
+
for (index = 0; index < 2 && kw_args > 0; index++) {
|
|
527
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_VARARGS</span>(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
|
|
528
|
+
if (value) { values[index] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_VARARGS</span>(value); kw_args--; }
|
|
529
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L3_error)</span>
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
if (unlikely(kw_args > 0)) {
|
|
533
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, 0, "__cinit__") < 0)) <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L3_error)</span>
|
|
534
|
+
}
|
|
535
|
+
} else if (unlikely(__pyx_nargs < 0)) {
|
|
536
|
+
goto __pyx_L5_argtuple_error;
|
|
537
|
+
} else {
|
|
538
|
+
}
|
|
539
|
+
__pyx_v_data = ((PyObject*)values[0]);
|
|
540
|
+
__pyx_v_default = values[1];
|
|
541
|
+
}
|
|
542
|
+
goto __pyx_L6_skip;
|
|
543
|
+
__pyx_L5_argtuple_error:;
|
|
544
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__cinit__", 0, 0, 0, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 20, __pyx_L3_error)</span>
|
|
545
|
+
__pyx_L6_skip:;
|
|
546
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
547
|
+
__pyx_L3_error:;
|
|
548
|
+
{
|
|
549
|
+
Py_ssize_t __pyx_temp;
|
|
550
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
551
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_VARARGS</span>(values[__pyx_temp]);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_args); __pyx_v_args = 0;
|
|
555
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
556
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
557
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
558
|
+
return -1;
|
|
559
|
+
__pyx_L4_argument_unpacking_done:;
|
|
560
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_data), (&PyDict_Type), 1, "data", 1))) <span class='error_goto'>__PYX_ERR(0, 23, __pyx_L1_error)</span>
|
|
561
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict___cinit__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), __pyx_v_data, __pyx_v_default, __pyx_v_args, __pyx_v_kwargs);
|
|
562
|
+
</pre><pre class="cython line score-0"> <span class="">025</span>: **kwargs: P.kwargs</pre>
|
|
563
|
+
<pre class="cython line score-0"> <span class="">026</span>: ):</pre>
|
|
564
|
+
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">027</span>: self.mapping = {}</pre>
|
|
565
|
+
<pre class='cython code score-3 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)</span>
|
|
566
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
567
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
568
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->mapping);
|
|
569
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->mapping);
|
|
570
|
+
__pyx_v_self->mapping = ((PyObject*)__pyx_t_1);
|
|
571
|
+
__pyx_t_1 = 0;
|
|
572
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">028</span>: self._columns = []</pre>
|
|
573
|
+
<pre class='cython code score-6 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)</span>
|
|
574
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
575
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
|
|
576
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_columns);
|
|
577
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_columns);
|
|
578
|
+
__pyx_v_self->_columns = ((PyObject*)__pyx_t_1);
|
|
579
|
+
__pyx_t_1 = 0;
|
|
580
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">029</span>: self.default = default</pre>
|
|
581
|
+
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_default);
|
|
582
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_default);
|
|
583
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->__pyx_default);
|
|
584
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->__pyx_default);
|
|
585
|
+
__pyx_v_self->__pyx_default = __pyx_v_default;
|
|
586
|
+
</pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">030</span>: self.mapping.update(*args, **kwargs)</pre>
|
|
587
|
+
<pre class='cython code score-12 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->mapping, __pyx_n_s_update);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
588
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
589
|
+
__pyx_t_2 = <span class='py_c_api'>PyDict_Copy</span>(__pyx_v_kwargs);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
590
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
591
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_v_args, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)</span>
|
|
592
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
593
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
594
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
595
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
596
|
+
</pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">031</span>: self.update(data, **kwargs)</pre>
|
|
597
|
+
<pre class='cython code score-21 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_update);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
598
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
599
|
+
__pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
600
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
601
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_data);
|
|
602
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_data);
|
|
603
|
+
if (<span class='pyx_c_api'>__Pyx_PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_v_data)) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L1_error)</span>;
|
|
604
|
+
__pyx_t_1 = <span class='py_c_api'>PyDict_Copy</span>(__pyx_v_kwargs);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
605
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
606
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_3, __pyx_t_2, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 31, __pyx_L1_error)</span>
|
|
607
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
608
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
609
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
610
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
611
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
612
|
+
</pre><pre class="cython line score-0"> <span class="">032</span>: </pre>
|
|
613
|
+
<pre class="cython line score-97" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: def update(self, items: Optional[dict]=None, **kwargs: P.kwargs):</pre>
|
|
614
|
+
<pre class='cython code score-97 '>/* Python wrapper */
|
|
615
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_3update(PyObject *__pyx_v_self,
|
|
616
|
+
#if CYTHON_METH_FASTCALL
|
|
617
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
618
|
+
#else
|
|
619
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
620
|
+
#endif
|
|
621
|
+
); /*proto*/
|
|
622
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_2update, "ClassDict.update(self, dict items: Optional[dict] = None, **kwargs: P.kwargs)");
|
|
623
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_3update = {"update", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_3update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_2update};
|
|
624
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_3update(PyObject *__pyx_v_self,
|
|
625
|
+
#if CYTHON_METH_FASTCALL
|
|
626
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
627
|
+
#else
|
|
628
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
629
|
+
#endif
|
|
630
|
+
) {
|
|
631
|
+
PyObject *__pyx_v_items = 0;
|
|
632
|
+
PyObject *__pyx_v_kwargs = 0;
|
|
633
|
+
#if !CYTHON_METH_FASTCALL
|
|
634
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
635
|
+
#endif
|
|
636
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
637
|
+
PyObject *__pyx_r = 0;
|
|
638
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
639
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("update (wrapper)", 0);
|
|
640
|
+
#if !CYTHON_METH_FASTCALL
|
|
641
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
642
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
643
|
+
#else
|
|
644
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
645
|
+
#endif
|
|
646
|
+
#endif
|
|
647
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
648
|
+
__pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return NULL;
|
|
649
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs);
|
|
650
|
+
{
|
|
651
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
|
|
652
|
+
PyObject* values[1] = {0};
|
|
653
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject*)Py_None));
|
|
654
|
+
if (__pyx_kwds) {
|
|
655
|
+
Py_ssize_t kw_args;
|
|
656
|
+
switch (__pyx_nargs) {
|
|
657
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
658
|
+
CYTHON_FALLTHROUGH;
|
|
659
|
+
case 0: break;
|
|
660
|
+
default: goto __pyx_L5_argtuple_error;
|
|
661
|
+
}
|
|
662
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
663
|
+
switch (__pyx_nargs) {
|
|
664
|
+
case 0:
|
|
665
|
+
if (kw_args > 0) {
|
|
666
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
|
|
667
|
+
if (value) { values[0] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
668
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L3_error)</span>
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
if (unlikely(kw_args > 0)) {
|
|
672
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
673
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, kwd_pos_args, "update") < 0)) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L3_error)</span>
|
|
674
|
+
}
|
|
675
|
+
} else {
|
|
676
|
+
switch (__pyx_nargs) {
|
|
677
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
678
|
+
CYTHON_FALLTHROUGH;
|
|
679
|
+
case 0: break;
|
|
680
|
+
default: goto __pyx_L5_argtuple_error;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
__pyx_v_items = ((PyObject*)values[0]);
|
|
684
|
+
}
|
|
685
|
+
goto __pyx_L6_skip;
|
|
686
|
+
__pyx_L5_argtuple_error:;
|
|
687
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("update", 0, 0, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L3_error)</span>
|
|
688
|
+
__pyx_L6_skip:;
|
|
689
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
690
|
+
__pyx_L3_error:;
|
|
691
|
+
{
|
|
692
|
+
Py_ssize_t __pyx_temp;
|
|
693
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
694
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0;
|
|
698
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
699
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
700
|
+
return NULL;
|
|
701
|
+
__pyx_L4_argument_unpacking_done:;
|
|
702
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_items), (&PyDict_Type), 1, "items", 1))) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
703
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_2update(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), __pyx_v_items, __pyx_v_kwargs);
|
|
704
|
+
|
|
705
|
+
/* function exit code */
|
|
706
|
+
goto __pyx_L0;
|
|
707
|
+
__pyx_L1_error:;
|
|
708
|
+
__pyx_r = NULL;
|
|
709
|
+
__pyx_L0:;
|
|
710
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs);
|
|
711
|
+
{
|
|
712
|
+
Py_ssize_t __pyx_temp;
|
|
713
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
714
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
718
|
+
return __pyx_r;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_2update(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_items, PyObject *__pyx_v_kwargs) {
|
|
722
|
+
PyObject *__pyx_v_key = NULL;
|
|
723
|
+
PyObject *__pyx_v_value = NULL;
|
|
724
|
+
PyObject *__pyx_v_k = NULL;
|
|
725
|
+
PyObject *__pyx_v_v = NULL;
|
|
726
|
+
PyObject *__pyx_v_attr = NULL;
|
|
727
|
+
PyObject *__pyx_v_fn = NULL;
|
|
728
|
+
PyObject *__pyx_r = NULL;
|
|
729
|
+
/* … */
|
|
730
|
+
/* function exit code */
|
|
731
|
+
__pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
732
|
+
goto __pyx_L0;
|
|
733
|
+
__pyx_L1_error:;
|
|
734
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
735
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
736
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
|
|
737
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12);
|
|
738
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
739
|
+
__pyx_r = NULL;
|
|
740
|
+
__pyx_L0:;
|
|
741
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_key);
|
|
742
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_value);
|
|
743
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_k);
|
|
744
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_v);
|
|
745
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_attr);
|
|
746
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_fn);
|
|
747
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
748
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
749
|
+
return __pyx_r;
|
|
750
|
+
}
|
|
751
|
+
/* … */
|
|
752
|
+
__pyx_tuple__9 = <span class='py_c_api'>PyTuple_Pack</span>(9, __pyx_n_s_self, __pyx_n_s_items, __pyx_n_s_kwargs, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_attr, __pyx_n_s_fn);<span class='error_goto'> if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
753
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__9);
|
|
754
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__9);
|
|
755
|
+
__pyx_codeobj__10 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_update, 33, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
756
|
+
/* … */
|
|
757
|
+
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
758
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
759
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_items, __pyx_kp_s_Optional_dict) < 0) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
760
|
+
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_kwargs, __pyx_kp_s_P_kwargs) < 0) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
761
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_3update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_update, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__10));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
762
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
763
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_tuple__11);
|
|
764
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetAnnotationsDict</span>(__pyx_t_2, __pyx_t_3);
|
|
765
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
766
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_update, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
767
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
768
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
769
|
+
__pyx_tuple__11 = <span class='py_c_api'>PyTuple_Pack</span>(1, Py_None);<span class='error_goto'> if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 33, __pyx_L1_error)</span>
|
|
770
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__11);
|
|
771
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__11);
|
|
772
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">034</span>: if isinstance(items, dict):</pre>
|
|
773
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PyDict_Check</span>(__pyx_v_items);
|
|
774
|
+
if (__pyx_t_1) {
|
|
775
|
+
/* … */
|
|
776
|
+
goto __pyx_L3;
|
|
777
|
+
}
|
|
778
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">035</span>: for key, value in items.items():</pre>
|
|
779
|
+
<pre class='cython code score-8 '> __pyx_t_3 = 0;
|
|
780
|
+
if (unlikely(__pyx_v_items == Py_None)) {
|
|
781
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
|
|
782
|
+
<span class='error_goto'>__PYX_ERR(0, 35, __pyx_L1_error)</span>
|
|
783
|
+
}
|
|
784
|
+
__pyx_t_6 = __Pyx_dict_iterator(__pyx_v_items, 1, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_5));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 35, __pyx_L1_error)</span>
|
|
785
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
786
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
787
|
+
__pyx_t_2 = __pyx_t_6;
|
|
788
|
+
__pyx_t_6 = 0;
|
|
789
|
+
while (1) {
|
|
790
|
+
__pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
|
|
791
|
+
if (unlikely(__pyx_t_8 == 0)) break;
|
|
792
|
+
if (unlikely(__pyx_t_8 == -1)) <span class='error_goto'>__PYX_ERR(0, 35, __pyx_L1_error)</span>
|
|
793
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
794
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
795
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_key, __pyx_t_6);
|
|
796
|
+
__pyx_t_6 = 0;
|
|
797
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_value, __pyx_t_7);
|
|
798
|
+
__pyx_t_7 = 0;
|
|
799
|
+
</pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">036</span>: self.mapping[key] = value</pre>
|
|
800
|
+
<pre class='cython code score-11 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
801
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
802
|
+
<span class='error_goto'>__PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
803
|
+
}
|
|
804
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_self->mapping, __pyx_v_key, __pyx_v_value) < 0))) <span class='error_goto'>__PYX_ERR(0, 36, __pyx_L1_error)</span>
|
|
805
|
+
}
|
|
806
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
807
|
+
</pre><pre class="cython line score-0"> <span class="">037</span>: else:</pre>
|
|
808
|
+
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">038</span>: for k, v in kwargs.items():</pre>
|
|
809
|
+
<pre class='cython code score-3 '> /*else*/ {
|
|
810
|
+
__pyx_t_4 = 0;
|
|
811
|
+
__pyx_t_7 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_5));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 38, __pyx_L1_error)</span>
|
|
812
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
813
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
814
|
+
__pyx_t_2 = __pyx_t_7;
|
|
815
|
+
__pyx_t_7 = 0;
|
|
816
|
+
while (1) {
|
|
817
|
+
__pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_3, &__pyx_t_4, &__pyx_t_7, &__pyx_t_6, NULL, __pyx_t_5);
|
|
818
|
+
if (unlikely(__pyx_t_8 == 0)) break;
|
|
819
|
+
if (unlikely(__pyx_t_8 == -1)) <span class='error_goto'>__PYX_ERR(0, 38, __pyx_L1_error)</span>
|
|
820
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7);
|
|
821
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
822
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_k, __pyx_t_7);
|
|
823
|
+
__pyx_t_7 = 0;
|
|
824
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_v, __pyx_t_6);
|
|
825
|
+
__pyx_t_6 = 0;
|
|
826
|
+
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">039</span>: attr = getattr(self, k, None)</pre>
|
|
827
|
+
<pre class='cython code score-1 '> __pyx_t_6 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_v_k, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 39, __pyx_L1_error)</span>
|
|
828
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
829
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_attr, __pyx_t_6);
|
|
830
|
+
__pyx_t_6 = 0;
|
|
831
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">040</span>: if fn := getattr(attr, 'default', None):</pre>
|
|
832
|
+
<pre class='cython code score-5 '> __pyx_t_6 = __Pyx_GetAttr3(__pyx_v_attr, __pyx_n_u_default, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 40, __pyx_L1_error)</span>
|
|
833
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
834
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_fn, __pyx_t_6);
|
|
835
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6);
|
|
836
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 40, __pyx_L1_error)</span>
|
|
837
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
838
|
+
if (__pyx_t_1) {
|
|
839
|
+
/* … */
|
|
840
|
+
}
|
|
841
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">041</span>: try:</pre>
|
|
842
|
+
<pre class='cython code score-10 '> {
|
|
843
|
+
/*try:*/ {
|
|
844
|
+
/* … */
|
|
845
|
+
}
|
|
846
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0;
|
|
847
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0;
|
|
848
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0;
|
|
849
|
+
goto __pyx_L16_try_end;
|
|
850
|
+
__pyx_L9_error:;
|
|
851
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0;
|
|
852
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
853
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
854
|
+
/* … */
|
|
855
|
+
__pyx_L11_except_error:;
|
|
856
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
857
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10);
|
|
858
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
859
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_9, __pyx_t_10, __pyx_t_11);
|
|
860
|
+
goto __pyx_L1_error;
|
|
861
|
+
__pyx_L10_exception_handled:;
|
|
862
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
863
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10);
|
|
864
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
865
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_9, __pyx_t_10, __pyx_t_11);
|
|
866
|
+
__pyx_L16_try_end:;
|
|
867
|
+
}
|
|
868
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">042</span>: if callable(fn):</pre>
|
|
869
|
+
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCallable_Check</span>(__pyx_v_fn);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 42, __pyx_L9_error)</span>
|
|
870
|
+
if (__pyx_t_1) {
|
|
871
|
+
/* … */
|
|
872
|
+
goto __pyx_L17;
|
|
873
|
+
}
|
|
874
|
+
</pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">043</span>: v = fn(v)</pre>
|
|
875
|
+
<pre class='cython code score-16 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_fn);
|
|
876
|
+
__pyx_t_7 = __pyx_v_fn; __pyx_t_12 = NULL;
|
|
877
|
+
__pyx_t_13 = 0;
|
|
878
|
+
#if CYTHON_UNPACK_METHODS
|
|
879
|
+
if (unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_7))) {
|
|
880
|
+
__pyx_t_12 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_7);
|
|
881
|
+
if (likely(__pyx_t_12)) {
|
|
882
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_7);
|
|
883
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_12);
|
|
884
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
885
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_7, function);
|
|
886
|
+
__pyx_t_13 = 1;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
#endif
|
|
890
|
+
{
|
|
891
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_v};
|
|
892
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_7, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
|
|
893
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0;
|
|
894
|
+
if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 43, __pyx_L9_error)</span>
|
|
895
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
896
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
897
|
+
}
|
|
898
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_v, __pyx_t_6);
|
|
899
|
+
__pyx_t_6 = 0;
|
|
900
|
+
</pre><pre class="cython line score-0"> <span class="">044</span>: else:</pre>
|
|
901
|
+
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">045</span>: v = fn</pre>
|
|
902
|
+
<pre class='cython code score-2 '> /*else*/ {
|
|
903
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_fn);
|
|
904
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_v, __pyx_v_fn);
|
|
905
|
+
}
|
|
906
|
+
__pyx_L17:;
|
|
907
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">046</span>: setattr(self, k, v)</pre>
|
|
908
|
+
<pre class='cython code score-5 '> __pyx_t_14 = <span class='py_c_api'>PyObject_SetAttr</span>(((PyObject *)__pyx_v_self), __pyx_v_k, __pyx_v_v);<span class='error_goto'> if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 46, __pyx_L9_error)</span>
|
|
909
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">047</span>: except (TypeError, KeyError):</pre>
|
|
910
|
+
<pre class='cython code score-2 '> __pyx_t_8 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_KeyError);
|
|
911
|
+
if (__pyx_t_8) {
|
|
912
|
+
<span class='pyx_c_api'>__Pyx_ErrRestore</span>(0,0,0);
|
|
913
|
+
goto __pyx_L10_exception_handled;
|
|
914
|
+
}
|
|
915
|
+
goto __pyx_L11_except_error;
|
|
916
|
+
</pre><pre class="cython line score-0"> <span class="">048</span>: pass</pre>
|
|
917
|
+
<pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: self.mapping[k] = v</pre>
|
|
918
|
+
<pre class='cython code score-11 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
919
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
920
|
+
<span class='error_goto'>__PYX_ERR(0, 49, __pyx_L1_error)</span>
|
|
921
|
+
}
|
|
922
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_self->mapping, __pyx_v_k, __pyx_v_v) < 0))) <span class='error_goto'>__PYX_ERR(0, 49, __pyx_L1_error)</span>
|
|
923
|
+
}
|
|
924
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
925
|
+
}
|
|
926
|
+
__pyx_L3:;
|
|
927
|
+
</pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">050</span>: self._columns = list(self.mapping.keys())</pre>
|
|
928
|
+
<pre class='cython code score-11 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
929
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
|
|
930
|
+
<span class='error_goto'>__PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
931
|
+
}
|
|
932
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_Keys</span>(__pyx_v_self->mapping);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
933
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
934
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PySequence_ListKeepNew</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 50, __pyx_L1_error)</span>
|
|
935
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
936
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
937
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
|
|
938
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_columns);
|
|
939
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_columns);
|
|
940
|
+
__pyx_v_self->_columns = ((PyObject*)__pyx_t_6);
|
|
941
|
+
__pyx_t_6 = 0;
|
|
942
|
+
</pre><pre class="cython line score-0"> <span class="">051</span>: </pre>
|
|
943
|
+
<pre class="cython line score-51" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">052</span>: def __missing__(self, key):</pre>
|
|
944
|
+
<pre class='cython code score-51 '>/* Python wrapper */
|
|
945
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_5__missing__(PyObject *__pyx_v_self,
|
|
946
|
+
#if CYTHON_METH_FASTCALL
|
|
947
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
948
|
+
#else
|
|
949
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
950
|
+
#endif
|
|
951
|
+
); /*proto*/
|
|
952
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_4__missing__, "ClassDict.__missing__(self, key)");
|
|
953
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_5__missing__ = {"__missing__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_5__missing__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_4__missing__};
|
|
954
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_5__missing__(PyObject *__pyx_v_self,
|
|
955
|
+
#if CYTHON_METH_FASTCALL
|
|
956
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
957
|
+
#else
|
|
958
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
959
|
+
#endif
|
|
960
|
+
) {
|
|
961
|
+
CYTHON_UNUSED PyObject *__pyx_v_key = 0;
|
|
962
|
+
#if !CYTHON_METH_FASTCALL
|
|
963
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
964
|
+
#endif
|
|
965
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
966
|
+
PyObject *__pyx_r = 0;
|
|
967
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
968
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__missing__ (wrapper)", 0);
|
|
969
|
+
#if !CYTHON_METH_FASTCALL
|
|
970
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
971
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
972
|
+
#else
|
|
973
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
974
|
+
#endif
|
|
975
|
+
#endif
|
|
976
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
977
|
+
{
|
|
978
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,0};
|
|
979
|
+
PyObject* values[1] = {0};
|
|
980
|
+
if (__pyx_kwds) {
|
|
981
|
+
Py_ssize_t kw_args;
|
|
982
|
+
switch (__pyx_nargs) {
|
|
983
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
984
|
+
CYTHON_FALLTHROUGH;
|
|
985
|
+
case 0: break;
|
|
986
|
+
default: goto __pyx_L5_argtuple_error;
|
|
987
|
+
}
|
|
988
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
989
|
+
switch (__pyx_nargs) {
|
|
990
|
+
case 0:
|
|
991
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
|
|
992
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
993
|
+
kw_args--;
|
|
994
|
+
}
|
|
995
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L3_error)</span>
|
|
996
|
+
else goto __pyx_L5_argtuple_error;
|
|
997
|
+
}
|
|
998
|
+
if (unlikely(kw_args > 0)) {
|
|
999
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
1000
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__missing__") < 0)) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L3_error)</span>
|
|
1001
|
+
}
|
|
1002
|
+
} else if (unlikely(__pyx_nargs != 1)) {
|
|
1003
|
+
goto __pyx_L5_argtuple_error;
|
|
1004
|
+
} else {
|
|
1005
|
+
values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1006
|
+
}
|
|
1007
|
+
__pyx_v_key = values[0];
|
|
1008
|
+
}
|
|
1009
|
+
goto __pyx_L6_skip;
|
|
1010
|
+
__pyx_L5_argtuple_error:;
|
|
1011
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__missing__", 1, 1, 1, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L3_error)</span>
|
|
1012
|
+
__pyx_L6_skip:;
|
|
1013
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1014
|
+
__pyx_L3_error:;
|
|
1015
|
+
{
|
|
1016
|
+
Py_ssize_t __pyx_temp;
|
|
1017
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1018
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__missing__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1022
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1023
|
+
return NULL;
|
|
1024
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1025
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_4__missing__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), __pyx_v_key);
|
|
1026
|
+
int __pyx_lineno = 0;
|
|
1027
|
+
const char *__pyx_filename = NULL;
|
|
1028
|
+
int __pyx_clineno = 0;
|
|
1029
|
+
|
|
1030
|
+
/* function exit code */
|
|
1031
|
+
{
|
|
1032
|
+
Py_ssize_t __pyx_temp;
|
|
1033
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1034
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1038
|
+
return __pyx_r;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_4__missing__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_key) {
|
|
1042
|
+
PyObject *__pyx_r = NULL;
|
|
1043
|
+
/* … */
|
|
1044
|
+
/* function exit code */
|
|
1045
|
+
__pyx_L0:;
|
|
1046
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1047
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1048
|
+
return __pyx_r;
|
|
1049
|
+
}
|
|
1050
|
+
/* … */
|
|
1051
|
+
__pyx_tuple__12 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_key);<span class='error_goto'> if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
1052
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__12);
|
|
1053
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__12);
|
|
1054
|
+
/* … */
|
|
1055
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_5__missing__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict___missing, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__13));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
1056
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1057
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_missing, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
1058
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1059
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
1060
|
+
__pyx_codeobj__13 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_missing, 52, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 52, __pyx_L1_error)</span>
|
|
1061
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: return self.default</pre>
|
|
1062
|
+
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1063
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->__pyx_default);
|
|
1064
|
+
__pyx_r = __pyx_v_self->__pyx_default;
|
|
1065
|
+
goto __pyx_L0;
|
|
1066
|
+
</pre><pre class="cython line score-0"> <span class="">054</span>: </pre>
|
|
1067
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">055</span>: def __len__(self):</pre>
|
|
1068
|
+
<pre class='cython code score-5 '>/* Python wrapper */
|
|
1069
|
+
static Py_ssize_t __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_7__len__(PyObject *__pyx_v_self); /*proto*/
|
|
1070
|
+
static Py_ssize_t __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_7__len__(PyObject *__pyx_v_self) {
|
|
1071
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1072
|
+
Py_ssize_t __pyx_r;
|
|
1073
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1074
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__len__ (wrapper)", 0);
|
|
1075
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1076
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_6__len__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
1077
|
+
|
|
1078
|
+
/* function exit code */
|
|
1079
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1080
|
+
return __pyx_r;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
static Py_ssize_t __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_6__len__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
1084
|
+
Py_ssize_t __pyx_r;
|
|
1085
|
+
/* … */
|
|
1086
|
+
/* function exit code */
|
|
1087
|
+
__pyx_L1_error:;
|
|
1088
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1089
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1090
|
+
__pyx_r = -1;
|
|
1091
|
+
__pyx_L0:;
|
|
1092
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1093
|
+
return __pyx_r;
|
|
1094
|
+
}
|
|
1095
|
+
</pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: return len(self.mapping)</pre>
|
|
1096
|
+
<pre class='cython code score-12 '> __pyx_t_1 = __pyx_v_self->mapping;
|
|
1097
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1);
|
|
1098
|
+
if (unlikely(__pyx_t_1 == Py_None)) {
|
|
1099
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "object of type 'NoneType' has no len()");
|
|
1100
|
+
<span class='error_goto'>__PYX_ERR(0, 56, __pyx_L1_error)</span>
|
|
1101
|
+
}
|
|
1102
|
+
__pyx_t_2 = <span class='py_c_api'>PyDict_Size</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 56, __pyx_L1_error)</span>
|
|
1103
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1104
|
+
__pyx_r = __pyx_t_2;
|
|
1105
|
+
goto __pyx_L0;
|
|
1106
|
+
</pre><pre class="cython line score-0"> <span class="">057</span>: </pre>
|
|
1107
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">058</span>: def __str__(self):</pre>
|
|
1108
|
+
<pre class='cython code score-7 '>/* Python wrapper */
|
|
1109
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_9__str__(PyObject *__pyx_v_self); /*proto*/
|
|
1110
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_9__str__(PyObject *__pyx_v_self) {
|
|
1111
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1112
|
+
PyObject *__pyx_r = 0;
|
|
1113
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1114
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__str__ (wrapper)", 0);
|
|
1115
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1116
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_8__str__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
1117
|
+
|
|
1118
|
+
/* function exit code */
|
|
1119
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1120
|
+
return __pyx_r;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_8__str__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
1124
|
+
PyObject *__pyx_r = NULL;
|
|
1125
|
+
/* … */
|
|
1126
|
+
/* function exit code */
|
|
1127
|
+
__pyx_L1_error:;
|
|
1128
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1129
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
1130
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
1131
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1132
|
+
__pyx_r = NULL;
|
|
1133
|
+
__pyx_L0:;
|
|
1134
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1135
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1136
|
+
return __pyx_r;
|
|
1137
|
+
}
|
|
1138
|
+
</pre><pre class="cython line score-36" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">059</span>: return f"<{type(self).__name__}({self.mapping})>"</pre>
|
|
1139
|
+
<pre class='cython code score-36 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1140
|
+
__pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)</span>
|
|
1141
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1142
|
+
__pyx_t_2 = 0;
|
|
1143
|
+
__pyx_t_3 = 127;
|
|
1144
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_);
|
|
1145
|
+
__pyx_t_2 += 1;
|
|
1146
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_);
|
|
1147
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_kp_u_);
|
|
1148
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)</span>
|
|
1149
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1150
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_t_4, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)</span>
|
|
1151
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1152
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1153
|
+
__pyx_t_3 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_3;
|
|
1154
|
+
__pyx_t_2 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
1155
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
1156
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 1, __pyx_t_5);
|
|
1157
|
+
__pyx_t_5 = 0;
|
|
1158
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__2);
|
|
1159
|
+
__pyx_t_2 += 1;
|
|
1160
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__2);
|
|
1161
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 2, __pyx_kp_u__2);
|
|
1162
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_v_self->mapping, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)</span>
|
|
1163
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1164
|
+
__pyx_t_3 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_3;
|
|
1165
|
+
__pyx_t_2 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
1166
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
1167
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 3, __pyx_t_5);
|
|
1168
|
+
__pyx_t_5 = 0;
|
|
1169
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__3);
|
|
1170
|
+
__pyx_t_2 += 2;
|
|
1171
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__3);
|
|
1172
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 4, __pyx_kp_u__3);
|
|
1173
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)</span>
|
|
1174
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1175
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1176
|
+
__pyx_r = __pyx_t_5;
|
|
1177
|
+
__pyx_t_5 = 0;
|
|
1178
|
+
goto __pyx_L0;
|
|
1179
|
+
</pre><pre class="cython line score-0"> <span class="">060</span>: </pre>
|
|
1180
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">061</span>: def __repr__(self):</pre>
|
|
1181
|
+
<pre class='cython code score-7 '>/* Python wrapper */
|
|
1182
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_11__repr__(PyObject *__pyx_v_self); /*proto*/
|
|
1183
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_11__repr__(PyObject *__pyx_v_self) {
|
|
1184
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1185
|
+
PyObject *__pyx_r = 0;
|
|
1186
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1187
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0);
|
|
1188
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1189
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_10__repr__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
1190
|
+
|
|
1191
|
+
/* function exit code */
|
|
1192
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1193
|
+
return __pyx_r;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_10__repr__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
1197
|
+
PyObject *__pyx_r = NULL;
|
|
1198
|
+
/* … */
|
|
1199
|
+
/* function exit code */
|
|
1200
|
+
__pyx_L1_error:;
|
|
1201
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1202
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
1203
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
1204
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1205
|
+
__pyx_r = NULL;
|
|
1206
|
+
__pyx_L0:;
|
|
1207
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1208
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1209
|
+
return __pyx_r;
|
|
1210
|
+
}
|
|
1211
|
+
</pre><pre class="cython line score-36" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">062</span>: return f"<{type(self).__name__}({self.mapping})>"</pre>
|
|
1212
|
+
<pre class='cython code score-36 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1213
|
+
__pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)</span>
|
|
1214
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1215
|
+
__pyx_t_2 = 0;
|
|
1216
|
+
__pyx_t_3 = 127;
|
|
1217
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_);
|
|
1218
|
+
__pyx_t_2 += 1;
|
|
1219
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_);
|
|
1220
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_kp_u_);
|
|
1221
|
+
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)</span>
|
|
1222
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
1223
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_t_4, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error)</span>
|
|
1224
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1225
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1226
|
+
__pyx_t_3 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_3;
|
|
1227
|
+
__pyx_t_2 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
1228
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
1229
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 1, __pyx_t_5);
|
|
1230
|
+
__pyx_t_5 = 0;
|
|
1231
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__2);
|
|
1232
|
+
__pyx_t_2 += 1;
|
|
1233
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__2);
|
|
1234
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 2, __pyx_kp_u__2);
|
|
1235
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimple</span>(__pyx_v_self->mapping, __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error)</span>
|
|
1236
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1237
|
+
__pyx_t_3 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_3;
|
|
1238
|
+
__pyx_t_2 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
1239
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
1240
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 3, __pyx_t_5);
|
|
1241
|
+
__pyx_t_5 = 0;
|
|
1242
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u__3);
|
|
1243
|
+
__pyx_t_2 += 2;
|
|
1244
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u__3);
|
|
1245
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 4, __pyx_kp_u__3);
|
|
1246
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 62, __pyx_L1_error)</span>
|
|
1247
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
1248
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
1249
|
+
__pyx_r = __pyx_t_5;
|
|
1250
|
+
__pyx_t_5 = 0;
|
|
1251
|
+
goto __pyx_L0;
|
|
1252
|
+
</pre><pre class="cython line score-0"> <span class="">063</span>: </pre>
|
|
1253
|
+
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">064</span>: def __contains__(self, key):</pre>
|
|
1254
|
+
<pre class='cython code score-4 '>/* Python wrapper */
|
|
1255
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
|
|
1256
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
|
|
1257
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1258
|
+
int __pyx_r;
|
|
1259
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1260
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__contains__ (wrapper)", 0);
|
|
1261
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1262
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_12__contains__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));
|
|
1263
|
+
|
|
1264
|
+
/* function exit code */
|
|
1265
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1266
|
+
return __pyx_r;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
static int __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_12__contains__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_key) {
|
|
1270
|
+
int __pyx_r;
|
|
1271
|
+
/* … */
|
|
1272
|
+
/* function exit code */
|
|
1273
|
+
__pyx_L1_error:;
|
|
1274
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1275
|
+
__pyx_r = -1;
|
|
1276
|
+
__pyx_L0:;
|
|
1277
|
+
return __pyx_r;
|
|
1278
|
+
}
|
|
1279
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">065</span>: return key in self._columns</pre>
|
|
1280
|
+
<pre class='cython code score-2 '> __pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PySequence_ContainsTF</span>(__pyx_v_key, __pyx_v_self->_columns, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 65, __pyx_L1_error)</span>
|
|
1281
|
+
__pyx_r = __pyx_t_1;
|
|
1282
|
+
goto __pyx_L0;
|
|
1283
|
+
</pre><pre class="cython line score-0"> <span class="">066</span>: </pre>
|
|
1284
|
+
<pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">067</span>: def get(self, key, default=None):</pre>
|
|
1285
|
+
<pre class='cython code score-71 '>/* Python wrapper */
|
|
1286
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_15get(PyObject *__pyx_v_self,
|
|
1287
|
+
#if CYTHON_METH_FASTCALL
|
|
1288
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1289
|
+
#else
|
|
1290
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1291
|
+
#endif
|
|
1292
|
+
); /*proto*/
|
|
1293
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_14get, "ClassDict.get(self, key, default=None)");
|
|
1294
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_15get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_15get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_14get};
|
|
1295
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_15get(PyObject *__pyx_v_self,
|
|
1296
|
+
#if CYTHON_METH_FASTCALL
|
|
1297
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1298
|
+
#else
|
|
1299
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1300
|
+
#endif
|
|
1301
|
+
) {
|
|
1302
|
+
PyObject *__pyx_v_key = 0;
|
|
1303
|
+
PyObject *__pyx_v_default = 0;
|
|
1304
|
+
#if !CYTHON_METH_FASTCALL
|
|
1305
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1306
|
+
#endif
|
|
1307
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1308
|
+
PyObject *__pyx_r = 0;
|
|
1309
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1310
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get (wrapper)", 0);
|
|
1311
|
+
#if !CYTHON_METH_FASTCALL
|
|
1312
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1313
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1314
|
+
#else
|
|
1315
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1316
|
+
#endif
|
|
1317
|
+
#endif
|
|
1318
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1319
|
+
{
|
|
1320
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
|
|
1321
|
+
PyObject* values[2] = {0,0};
|
|
1322
|
+
values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
1323
|
+
if (__pyx_kwds) {
|
|
1324
|
+
Py_ssize_t kw_args;
|
|
1325
|
+
switch (__pyx_nargs) {
|
|
1326
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
1327
|
+
CYTHON_FALLTHROUGH;
|
|
1328
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1329
|
+
CYTHON_FALLTHROUGH;
|
|
1330
|
+
case 0: break;
|
|
1331
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1332
|
+
}
|
|
1333
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
1334
|
+
switch (__pyx_nargs) {
|
|
1335
|
+
case 0:
|
|
1336
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
|
|
1337
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
1338
|
+
kw_args--;
|
|
1339
|
+
}
|
|
1340
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L3_error)</span>
|
|
1341
|
+
else goto __pyx_L5_argtuple_error;
|
|
1342
|
+
CYTHON_FALLTHROUGH;
|
|
1343
|
+
case 1:
|
|
1344
|
+
if (kw_args > 0) {
|
|
1345
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
|
|
1346
|
+
if (value) { values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
1347
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L3_error)</span>
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (unlikely(kw_args > 0)) {
|
|
1351
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
1352
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L3_error)</span>
|
|
1353
|
+
}
|
|
1354
|
+
} else {
|
|
1355
|
+
switch (__pyx_nargs) {
|
|
1356
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
1357
|
+
CYTHON_FALLTHROUGH;
|
|
1358
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
1359
|
+
break;
|
|
1360
|
+
default: goto __pyx_L5_argtuple_error;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
__pyx_v_key = values[0];
|
|
1364
|
+
__pyx_v_default = values[1];
|
|
1365
|
+
}
|
|
1366
|
+
goto __pyx_L6_skip;
|
|
1367
|
+
__pyx_L5_argtuple_error:;
|
|
1368
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get", 0, 1, 2, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L3_error)</span>
|
|
1369
|
+
__pyx_L6_skip:;
|
|
1370
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
1371
|
+
__pyx_L3_error:;
|
|
1372
|
+
{
|
|
1373
|
+
Py_ssize_t __pyx_temp;
|
|
1374
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1375
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1379
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1380
|
+
return NULL;
|
|
1381
|
+
__pyx_L4_argument_unpacking_done:;
|
|
1382
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_14get(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
|
|
1383
|
+
|
|
1384
|
+
/* function exit code */
|
|
1385
|
+
{
|
|
1386
|
+
Py_ssize_t __pyx_temp;
|
|
1387
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
1388
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1392
|
+
return __pyx_r;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_14get(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
|
|
1396
|
+
PyObject *__pyx_r = NULL;
|
|
1397
|
+
/* … */
|
|
1398
|
+
/* function exit code */
|
|
1399
|
+
__pyx_L1_error:;
|
|
1400
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1401
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1402
|
+
__pyx_r = NULL;
|
|
1403
|
+
__pyx_L0:;
|
|
1404
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1405
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1406
|
+
return __pyx_r;
|
|
1407
|
+
}
|
|
1408
|
+
/* … */
|
|
1409
|
+
__pyx_tuple__14 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default);<span class='error_goto'> if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 67, __pyx_L1_error)</span>
|
|
1410
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__14);
|
|
1411
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__14);
|
|
1412
|
+
/* … */
|
|
1413
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_15get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_get, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__15));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)</span>
|
|
1414
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1415
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_tuple__11);
|
|
1416
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_get, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 67, __pyx_L1_error)</span>
|
|
1417
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1418
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
1419
|
+
__pyx_codeobj__15 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_get, 67, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 67, __pyx_L1_error)</span>
|
|
1420
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">068</span>: return self.mapping.get(key, default)</pre>
|
|
1421
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1422
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1423
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
|
|
1424
|
+
<span class='error_goto'>__PYX_ERR(0, 68, __pyx_L1_error)</span>
|
|
1425
|
+
}
|
|
1426
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_GetItemDefault</span>(__pyx_v_self->mapping, __pyx_v_key, __pyx_v_default);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)</span>
|
|
1427
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1428
|
+
__pyx_r = __pyx_t_1;
|
|
1429
|
+
__pyx_t_1 = 0;
|
|
1430
|
+
goto __pyx_L0;
|
|
1431
|
+
</pre><pre class="cython line score-0"> <span class="">069</span>: </pre>
|
|
1432
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">070</span>: def __delitem__(self, key):</pre>
|
|
1433
|
+
<pre class='cython code score-7 '>/* Python wrapper */
|
|
1434
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
|
|
1435
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
|
|
1436
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1437
|
+
int __pyx_r;
|
|
1438
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1439
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__delitem__ (wrapper)", 0);
|
|
1440
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1441
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_16__delitem__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));
|
|
1442
|
+
|
|
1443
|
+
/* function exit code */
|
|
1444
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1445
|
+
return __pyx_r;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
static int __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_16__delitem__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_key) {
|
|
1449
|
+
int __pyx_r;
|
|
1450
|
+
/* … */
|
|
1451
|
+
/* function exit code */
|
|
1452
|
+
__pyx_r = 0;
|
|
1453
|
+
goto __pyx_L0;
|
|
1454
|
+
__pyx_L1_error:;
|
|
1455
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
1456
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
1457
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
1458
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1459
|
+
__pyx_r = -1;
|
|
1460
|
+
__pyx_L0:;
|
|
1461
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1462
|
+
return __pyx_r;
|
|
1463
|
+
}
|
|
1464
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">071</span>: if key in self.mapping:</pre>
|
|
1465
|
+
<pre class='cython code score-7 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1466
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
1467
|
+
<span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span>
|
|
1468
|
+
}
|
|
1469
|
+
__pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_v_key, __pyx_v_self->mapping, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 71, __pyx_L1_error)</span>
|
|
1470
|
+
if (likely(__pyx_t_1)) {
|
|
1471
|
+
/* … */
|
|
1472
|
+
goto __pyx_L3;
|
|
1473
|
+
}
|
|
1474
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">072</span>: self.mapping.pop(key, None)</pre>
|
|
1475
|
+
<pre class='cython code score-8 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1476
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
|
|
1477
|
+
<span class='error_goto'>__PYX_ERR(0, 72, __pyx_L1_error)</span>
|
|
1478
|
+
}
|
|
1479
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_Pop</span>(__pyx_v_self->mapping, __pyx_v_key, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)</span>
|
|
1480
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1481
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1482
|
+
</pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">073</span>: self._columns.remove(key)</pre>
|
|
1483
|
+
<pre class='cython code score-17 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->_columns, __pyx_n_s_remove);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error)</span>
|
|
1484
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1485
|
+
__pyx_t_4 = NULL;
|
|
1486
|
+
__pyx_t_5 = 0;
|
|
1487
|
+
#if CYTHON_UNPACK_METHODS
|
|
1488
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) {
|
|
1489
|
+
__pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3);
|
|
1490
|
+
if (likely(__pyx_t_4)) {
|
|
1491
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3);
|
|
1492
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4);
|
|
1493
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
1494
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function);
|
|
1495
|
+
__pyx_t_5 = 1;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
#endif
|
|
1499
|
+
{
|
|
1500
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_key};
|
|
1501
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
1502
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
1503
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 73, __pyx_L1_error)</span>
|
|
1504
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1505
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1506
|
+
}
|
|
1507
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1508
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">074</span>: if hasattr(self, key):</pre>
|
|
1509
|
+
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_HasAttr</span>(((PyObject *)__pyx_v_self), __pyx_v_key);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 74, __pyx_L1_error)</span>
|
|
1510
|
+
if (__pyx_t_1) {
|
|
1511
|
+
/* … */
|
|
1512
|
+
}
|
|
1513
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">075</span>: setattr(self, key, None)</pre>
|
|
1514
|
+
<pre class='cython code score-5 '> __pyx_t_6 = <span class='py_c_api'>PyObject_SetAttr</span>(((PyObject *)__pyx_v_self), __pyx_v_key, Py_None);<span class='error_goto'> if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 75, __pyx_L1_error)</span>
|
|
1515
|
+
</pre><pre class="cython line score-0"> <span class="">076</span>: else:</pre>
|
|
1516
|
+
<pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">077</span>: raise KeyError(key)</pre>
|
|
1517
|
+
<pre class='cython code score-5 '> /*else*/ {
|
|
1518
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_KeyError, __pyx_v_key);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)</span>
|
|
1519
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1520
|
+
<span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0);
|
|
1521
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1522
|
+
<span class='error_goto'>__PYX_ERR(0, 77, __pyx_L1_error)</span>
|
|
1523
|
+
}
|
|
1524
|
+
__pyx_L3:;
|
|
1525
|
+
</pre><pre class="cython line score-0"> <span class="">078</span>: </pre>
|
|
1526
|
+
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">079</span>: def __setitem__(self, key, value):</pre>
|
|
1527
|
+
<pre class='cython code score-4 '>/* Python wrapper */
|
|
1528
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_19__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
|
|
1529
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_19__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
|
|
1530
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1531
|
+
int __pyx_r;
|
|
1532
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1533
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__setitem__ (wrapper)", 0);
|
|
1534
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1535
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_18__setitem__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
|
|
1536
|
+
|
|
1537
|
+
/* function exit code */
|
|
1538
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1539
|
+
return __pyx_r;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
static int __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_18__setitem__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
|
|
1543
|
+
int __pyx_r;
|
|
1544
|
+
/* … */
|
|
1545
|
+
/* function exit code */
|
|
1546
|
+
__pyx_r = 0;
|
|
1547
|
+
goto __pyx_L0;
|
|
1548
|
+
__pyx_L1_error:;
|
|
1549
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1550
|
+
__pyx_r = -1;
|
|
1551
|
+
__pyx_L0:;
|
|
1552
|
+
return __pyx_r;
|
|
1553
|
+
}
|
|
1554
|
+
</pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">080</span>: self.mapping[key] = value</pre>
|
|
1555
|
+
<pre class='cython code score-10 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1556
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
1557
|
+
<span class='error_goto'>__PYX_ERR(0, 80, __pyx_L1_error)</span>
|
|
1558
|
+
}
|
|
1559
|
+
if (unlikely((<span class='py_c_api'>PyDict_SetItem</span>(__pyx_v_self->mapping, __pyx_v_key, __pyx_v_value) < 0))) <span class='error_goto'>__PYX_ERR(0, 80, __pyx_L1_error)</span>
|
|
1560
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">081</span>: if key not in self._columns:</pre>
|
|
1561
|
+
<pre class='cython code score-2 '> __pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PySequence_ContainsTF</span>(__pyx_v_key, __pyx_v_self->_columns, Py_NE)); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 81, __pyx_L1_error)</span>
|
|
1562
|
+
if (__pyx_t_1) {
|
|
1563
|
+
/* … */
|
|
1564
|
+
}
|
|
1565
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">082</span>: self._columns.append(key)</pre>
|
|
1566
|
+
<pre class='cython code score-7 '> if (unlikely(__pyx_v_self->_columns == Py_None)) {
|
|
1567
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
|
|
1568
|
+
<span class='error_goto'>__PYX_ERR(0, 82, __pyx_L1_error)</span>
|
|
1569
|
+
}
|
|
1570
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_self->_columns, __pyx_v_key);<span class='error_goto'> if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 82, __pyx_L1_error)</span>
|
|
1571
|
+
</pre><pre class="cython line score-0"> <span class="">083</span>: </pre>
|
|
1572
|
+
<pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">084</span>: def __getitem__(self, key):</pre>
|
|
1573
|
+
<pre class='cython code score-8 '>/* Python wrapper */
|
|
1574
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
|
|
1575
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
|
|
1576
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1577
|
+
PyObject *__pyx_r = 0;
|
|
1578
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1579
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__getitem__ (wrapper)", 0);
|
|
1580
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
1581
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_20__getitem__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));
|
|
1582
|
+
|
|
1583
|
+
/* function exit code */
|
|
1584
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1585
|
+
return __pyx_r;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_20__getitem__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_key) {
|
|
1589
|
+
PyObject *__pyx_7genexpr__pyx_v_k = NULL;
|
|
1590
|
+
PyObject *__pyx_r = NULL;
|
|
1591
|
+
/* … */
|
|
1592
|
+
/* function exit code */
|
|
1593
|
+
__pyx_L1_error:;
|
|
1594
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
1595
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
1596
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
1597
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1598
|
+
__pyx_r = NULL;
|
|
1599
|
+
__pyx_L0:;
|
|
1600
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_k);
|
|
1601
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1602
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1603
|
+
return __pyx_r;
|
|
1604
|
+
}
|
|
1605
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">085</span>: if isinstance(key, list):</pre>
|
|
1606
|
+
<pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PyList_Check</span>(__pyx_v_key);
|
|
1607
|
+
if (__pyx_t_1) {
|
|
1608
|
+
/* … */
|
|
1609
|
+
}
|
|
1610
|
+
</pre><pre class="cython line score-67" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">086</span>: return [self.mapping[k] for k in key]</pre>
|
|
1611
|
+
<pre class='cython code score-67 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1612
|
+
{ /* enter inner scope */
|
|
1613
|
+
__pyx_t_2 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1614
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1615
|
+
if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_v_key)) || <span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_v_key)) {
|
|
1616
|
+
__pyx_t_3 = __pyx_v_key; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3);
|
|
1617
|
+
__pyx_t_4 = 0;
|
|
1618
|
+
__pyx_t_5 = NULL;
|
|
1619
|
+
} else {
|
|
1620
|
+
__pyx_t_4 = -1; __pyx_t_3 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_v_key);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1621
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
1622
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetIterNextFunc</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1623
|
+
}
|
|
1624
|
+
for (;;) {
|
|
1625
|
+
if (likely(!__pyx_t_5)) {
|
|
1626
|
+
if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3))) {
|
|
1627
|
+
{
|
|
1628
|
+
Py_ssize_t __pyx_temp = <span class='pyx_c_api'>__Pyx_PyList_GET_SIZE</span>(__pyx_t_3);
|
|
1629
|
+
#if !CYTHON_ASSUME_SAFE_MACROS
|
|
1630
|
+
if (unlikely((__pyx_temp < 0))) <span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1631
|
+
#endif
|
|
1632
|
+
if (__pyx_t_4 >= __pyx_temp) break;
|
|
1633
|
+
}
|
|
1634
|
+
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
1635
|
+
__pyx_t_6 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_3, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) <span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1636
|
+
#else
|
|
1637
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PySequence_ITEM</span>(__pyx_t_3, __pyx_t_4); __pyx_t_4++;<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1638
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1639
|
+
#endif
|
|
1640
|
+
} else {
|
|
1641
|
+
{
|
|
1642
|
+
Py_ssize_t __pyx_temp = <span class='pyx_c_api'>__Pyx_PyTuple_GET_SIZE</span>(__pyx_t_3);
|
|
1643
|
+
#if !CYTHON_ASSUME_SAFE_MACROS
|
|
1644
|
+
if (unlikely((__pyx_temp < 0))) <span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1645
|
+
#endif
|
|
1646
|
+
if (__pyx_t_4 >= __pyx_temp) break;
|
|
1647
|
+
}
|
|
1648
|
+
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
1649
|
+
__pyx_t_6 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_3, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) <span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1650
|
+
#else
|
|
1651
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PySequence_ITEM</span>(__pyx_t_3, __pyx_t_4); __pyx_t_4++;<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1652
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1653
|
+
#endif
|
|
1654
|
+
}
|
|
1655
|
+
} else {
|
|
1656
|
+
__pyx_t_6 = __pyx_t_5(__pyx_t_3);
|
|
1657
|
+
if (unlikely(!__pyx_t_6)) {
|
|
1658
|
+
PyObject* exc_type = <span class='py_c_api'>PyErr_Occurred</span>();
|
|
1659
|
+
if (exc_type) {
|
|
1660
|
+
if (likely(<span class='pyx_c_api'>__Pyx_PyErr_GivenExceptionMatches</span>(exc_type, PyExc_StopIteration))) <span class='py_c_api'>PyErr_Clear</span>();
|
|
1661
|
+
else <span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1662
|
+
}
|
|
1663
|
+
break;
|
|
1664
|
+
}
|
|
1665
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1666
|
+
}
|
|
1667
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_7genexpr__pyx_v_k, __pyx_t_6);
|
|
1668
|
+
__pyx_t_6 = 0;
|
|
1669
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1670
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
1671
|
+
<span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1672
|
+
}
|
|
1673
|
+
__pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_self->mapping, __pyx_7genexpr__pyx_v_k);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1674
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
|
|
1675
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ListComp_Append</span>(__pyx_t_2, (PyObject*)__pyx_t_6))) <span class='error_goto'>__PYX_ERR(0, 86, __pyx_L6_error)</span>
|
|
1676
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1677
|
+
}
|
|
1678
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1679
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0;
|
|
1680
|
+
goto __pyx_L10_exit_scope;
|
|
1681
|
+
__pyx_L6_error:;
|
|
1682
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0;
|
|
1683
|
+
goto __pyx_L1_error;
|
|
1684
|
+
__pyx_L10_exit_scope:;
|
|
1685
|
+
} /* exit inner scope */
|
|
1686
|
+
__pyx_r = __pyx_t_2;
|
|
1687
|
+
__pyx_t_2 = 0;
|
|
1688
|
+
goto __pyx_L0;
|
|
1689
|
+
</pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">087</span>: try:</pre>
|
|
1690
|
+
<pre class='cython code score-9 '> {
|
|
1691
|
+
/*try:*/ {
|
|
1692
|
+
/* … */
|
|
1693
|
+
}
|
|
1694
|
+
__pyx_L11_error:;
|
|
1695
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1696
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1697
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1698
|
+
/* … */
|
|
1699
|
+
__pyx_L13_except_error:;
|
|
1700
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
1701
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8);
|
|
1702
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
1703
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
1704
|
+
goto __pyx_L1_error;
|
|
1705
|
+
__pyx_L15_try_return:;
|
|
1706
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
1707
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8);
|
|
1708
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
1709
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
1710
|
+
goto __pyx_L0;
|
|
1711
|
+
__pyx_L14_except_return:;
|
|
1712
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7);
|
|
1713
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8);
|
|
1714
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9);
|
|
1715
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_7, __pyx_t_8, __pyx_t_9);
|
|
1716
|
+
goto __pyx_L0;
|
|
1717
|
+
}
|
|
1718
|
+
</pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">088</span>: try:</pre>
|
|
1719
|
+
<pre class='cython code score-9 '> {
|
|
1720
|
+
/*try:*/ {
|
|
1721
|
+
/* … */
|
|
1722
|
+
}
|
|
1723
|
+
__pyx_L17_error:;
|
|
1724
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1725
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1726
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1727
|
+
/* … */
|
|
1728
|
+
__pyx_L19_except_error:;
|
|
1729
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10);
|
|
1730
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
1731
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12);
|
|
1732
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_10, __pyx_t_11, __pyx_t_12);
|
|
1733
|
+
goto __pyx_L11_error;
|
|
1734
|
+
__pyx_L21_try_return:;
|
|
1735
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10);
|
|
1736
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
1737
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12);
|
|
1738
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_10, __pyx_t_11, __pyx_t_12);
|
|
1739
|
+
goto __pyx_L15_try_return;
|
|
1740
|
+
__pyx_L20_except_return:;
|
|
1741
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10);
|
|
1742
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11);
|
|
1743
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12);
|
|
1744
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_10, __pyx_t_11, __pyx_t_12);
|
|
1745
|
+
goto __pyx_L15_try_return;
|
|
1746
|
+
}
|
|
1747
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">089</span>: return self.mapping[key]</pre>
|
|
1748
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1749
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1750
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
1751
|
+
<span class='error_goto'>__PYX_ERR(0, 89, __pyx_L17_error)</span>
|
|
1752
|
+
}
|
|
1753
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_self->mapping, __pyx_v_key);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L17_error)</span>
|
|
1754
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1755
|
+
__pyx_r = __pyx_t_2;
|
|
1756
|
+
__pyx_t_2 = 0;
|
|
1757
|
+
goto __pyx_L21_try_return;
|
|
1758
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">090</span>: except KeyError:</pre>
|
|
1759
|
+
<pre class='cython code score-6 '> __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_KeyError);
|
|
1760
|
+
if (__pyx_t_13) {
|
|
1761
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1762
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_2, &__pyx_t_3, &__pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 90, __pyx_L19_except_error)</span>
|
|
1763
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_2);
|
|
1764
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_3);
|
|
1765
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_6);
|
|
1766
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">091</span>: return None</pre>
|
|
1767
|
+
<pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1768
|
+
__pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
1769
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1770
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1771
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1772
|
+
goto __pyx_L20_except_return;
|
|
1773
|
+
}
|
|
1774
|
+
goto __pyx_L19_except_error;
|
|
1775
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">092</span>: except KeyError:</pre>
|
|
1776
|
+
<pre class='cython code score-6 '> __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_KeyError);
|
|
1777
|
+
if (__pyx_t_13) {
|
|
1778
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1779
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_6, &__pyx_t_3, &__pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 92, __pyx_L13_except_error)</span>
|
|
1780
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_6);
|
|
1781
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_3);
|
|
1782
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_2);
|
|
1783
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">093</span>: return self.default</pre>
|
|
1784
|
+
<pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1785
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->__pyx_default);
|
|
1786
|
+
__pyx_r = __pyx_v_self->__pyx_default;
|
|
1787
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1788
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
1789
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
1790
|
+
goto __pyx_L14_except_return;
|
|
1791
|
+
}
|
|
1792
|
+
goto __pyx_L13_except_error;
|
|
1793
|
+
</pre><pre class="cython line score-0"> <span class="">094</span>: </pre>
|
|
1794
|
+
<pre class="cython line score-35" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">095</span>: def keys(self):</pre>
|
|
1795
|
+
<pre class='cython code score-35 '>/* Python wrapper */
|
|
1796
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_23keys(PyObject *__pyx_v_self,
|
|
1797
|
+
#if CYTHON_METH_FASTCALL
|
|
1798
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1799
|
+
#else
|
|
1800
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1801
|
+
#endif
|
|
1802
|
+
); /*proto*/
|
|
1803
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_22keys, "ClassDict.keys(self)");
|
|
1804
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_23keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_23keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_22keys};
|
|
1805
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_23keys(PyObject *__pyx_v_self,
|
|
1806
|
+
#if CYTHON_METH_FASTCALL
|
|
1807
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1808
|
+
#else
|
|
1809
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1810
|
+
#endif
|
|
1811
|
+
) {
|
|
1812
|
+
#if !CYTHON_METH_FASTCALL
|
|
1813
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1814
|
+
#endif
|
|
1815
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1816
|
+
PyObject *__pyx_r = 0;
|
|
1817
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1818
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("keys (wrapper)", 0);
|
|
1819
|
+
#if !CYTHON_METH_FASTCALL
|
|
1820
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1821
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1822
|
+
#else
|
|
1823
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1824
|
+
#endif
|
|
1825
|
+
#endif
|
|
1826
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1827
|
+
if (unlikely(__pyx_nargs > 0)) {
|
|
1828
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("keys", 1, 0, 0, __pyx_nargs); return NULL;}
|
|
1829
|
+
if (unlikely(__pyx_kwds) && <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "keys", 0))) return NULL;
|
|
1830
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_22keys(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
1831
|
+
|
|
1832
|
+
/* function exit code */
|
|
1833
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1834
|
+
return __pyx_r;
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_22keys(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
1838
|
+
PyObject *__pyx_r = NULL;
|
|
1839
|
+
/* … */
|
|
1840
|
+
/* function exit code */
|
|
1841
|
+
__pyx_L1_error:;
|
|
1842
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1843
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1844
|
+
__pyx_r = NULL;
|
|
1845
|
+
__pyx_L0:;
|
|
1846
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1847
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1848
|
+
return __pyx_r;
|
|
1849
|
+
}
|
|
1850
|
+
/* … */
|
|
1851
|
+
__pyx_tuple__16 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 95, __pyx_L1_error)</span>
|
|
1852
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__16);
|
|
1853
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__16);
|
|
1854
|
+
/* … */
|
|
1855
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_23keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_keys, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__17));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)</span>
|
|
1856
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1857
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_keys, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 95, __pyx_L1_error)</span>
|
|
1858
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1859
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
1860
|
+
__pyx_codeobj__17 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_keys, 95, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 95, __pyx_L1_error)</span>
|
|
1861
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">096</span>: return self.mapping.keys()</pre>
|
|
1862
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1863
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1864
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
|
|
1865
|
+
<span class='error_goto'>__PYX_ERR(0, 96, __pyx_L1_error)</span>
|
|
1866
|
+
}
|
|
1867
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Keys</span>(__pyx_v_self->mapping);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)</span>
|
|
1868
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1869
|
+
__pyx_r = __pyx_t_1;
|
|
1870
|
+
__pyx_t_1 = 0;
|
|
1871
|
+
goto __pyx_L0;
|
|
1872
|
+
</pre><pre class="cython line score-0"> <span class="">097</span>: </pre>
|
|
1873
|
+
<pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: def values(self):</pre>
|
|
1874
|
+
<pre class='cython code score-30 '>/* Python wrapper */
|
|
1875
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_25values(PyObject *__pyx_v_self,
|
|
1876
|
+
#if CYTHON_METH_FASTCALL
|
|
1877
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1878
|
+
#else
|
|
1879
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1880
|
+
#endif
|
|
1881
|
+
); /*proto*/
|
|
1882
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_24values, "ClassDict.values(self)");
|
|
1883
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_25values = {"values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_25values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_24values};
|
|
1884
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_25values(PyObject *__pyx_v_self,
|
|
1885
|
+
#if CYTHON_METH_FASTCALL
|
|
1886
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1887
|
+
#else
|
|
1888
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1889
|
+
#endif
|
|
1890
|
+
) {
|
|
1891
|
+
#if !CYTHON_METH_FASTCALL
|
|
1892
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1893
|
+
#endif
|
|
1894
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1895
|
+
PyObject *__pyx_r = 0;
|
|
1896
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1897
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("values (wrapper)", 0);
|
|
1898
|
+
#if !CYTHON_METH_FASTCALL
|
|
1899
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1900
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1901
|
+
#else
|
|
1902
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1903
|
+
#endif
|
|
1904
|
+
#endif
|
|
1905
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1906
|
+
if (unlikely(__pyx_nargs > 0)) {
|
|
1907
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("values", 1, 0, 0, __pyx_nargs); return NULL;}
|
|
1908
|
+
if (unlikely(__pyx_kwds) && <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "values", 0))) return NULL;
|
|
1909
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_24values(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
1910
|
+
|
|
1911
|
+
/* function exit code */
|
|
1912
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1913
|
+
return __pyx_r;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_24values(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
1917
|
+
PyObject *__pyx_r = NULL;
|
|
1918
|
+
/* … */
|
|
1919
|
+
/* function exit code */
|
|
1920
|
+
__pyx_L1_error:;
|
|
1921
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1922
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1923
|
+
__pyx_r = NULL;
|
|
1924
|
+
__pyx_L0:;
|
|
1925
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
1926
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1927
|
+
return __pyx_r;
|
|
1928
|
+
}
|
|
1929
|
+
/* … */
|
|
1930
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_25values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_values, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__18));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)</span>
|
|
1931
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
1932
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_values, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 98, __pyx_L1_error)</span>
|
|
1933
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
1934
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
1935
|
+
/* … */
|
|
1936
|
+
__pyx_codeobj__18 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_values, 98, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 98, __pyx_L1_error)</span>
|
|
1937
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">099</span>: return self.mapping.values()</pre>
|
|
1938
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
1939
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
1940
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
|
|
1941
|
+
<span class='error_goto'>__PYX_ERR(0, 99, __pyx_L1_error)</span>
|
|
1942
|
+
}
|
|
1943
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Values</span>(__pyx_v_self->mapping);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)</span>
|
|
1944
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
1945
|
+
__pyx_r = __pyx_t_1;
|
|
1946
|
+
__pyx_t_1 = 0;
|
|
1947
|
+
goto __pyx_L0;
|
|
1948
|
+
</pre><pre class="cython line score-0"> <span class="">100</span>: </pre>
|
|
1949
|
+
<pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">101</span>: def items(self):</pre>
|
|
1950
|
+
<pre class='cython code score-30 '>/* Python wrapper */
|
|
1951
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_27items(PyObject *__pyx_v_self,
|
|
1952
|
+
#if CYTHON_METH_FASTCALL
|
|
1953
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1954
|
+
#else
|
|
1955
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1956
|
+
#endif
|
|
1957
|
+
); /*proto*/
|
|
1958
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_26items, "ClassDict.items(self)");
|
|
1959
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_27items = {"items", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_27items, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_26items};
|
|
1960
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_27items(PyObject *__pyx_v_self,
|
|
1961
|
+
#if CYTHON_METH_FASTCALL
|
|
1962
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
1963
|
+
#else
|
|
1964
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
1965
|
+
#endif
|
|
1966
|
+
) {
|
|
1967
|
+
#if !CYTHON_METH_FASTCALL
|
|
1968
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
1969
|
+
#endif
|
|
1970
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
1971
|
+
PyObject *__pyx_r = 0;
|
|
1972
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
1973
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("items (wrapper)", 0);
|
|
1974
|
+
#if !CYTHON_METH_FASTCALL
|
|
1975
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
1976
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
1977
|
+
#else
|
|
1978
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
1979
|
+
#endif
|
|
1980
|
+
#endif
|
|
1981
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
1982
|
+
if (unlikely(__pyx_nargs > 0)) {
|
|
1983
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("items", 1, 0, 0, __pyx_nargs); return NULL;}
|
|
1984
|
+
if (unlikely(__pyx_kwds) && <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "items", 0))) return NULL;
|
|
1985
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_26items(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
1986
|
+
|
|
1987
|
+
/* function exit code */
|
|
1988
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
1989
|
+
return __pyx_r;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_26items(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
1993
|
+
PyObject *__pyx_r = NULL;
|
|
1994
|
+
/* … */
|
|
1995
|
+
/* function exit code */
|
|
1996
|
+
__pyx_L1_error:;
|
|
1997
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
1998
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
1999
|
+
__pyx_r = NULL;
|
|
2000
|
+
__pyx_L0:;
|
|
2001
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2002
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2003
|
+
return __pyx_r;
|
|
2004
|
+
}
|
|
2005
|
+
/* … */
|
|
2006
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_27items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_items, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__19));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)</span>
|
|
2007
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2008
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_items, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 101, __pyx_L1_error)</span>
|
|
2009
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2010
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
2011
|
+
/* … */
|
|
2012
|
+
__pyx_codeobj__19 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_items, 101, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 101, __pyx_L1_error)</span>
|
|
2013
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">102</span>: return self.mapping.items()</pre>
|
|
2014
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2015
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
2016
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
|
|
2017
|
+
<span class='error_goto'>__PYX_ERR(0, 102, __pyx_L1_error)</span>
|
|
2018
|
+
}
|
|
2019
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Items</span>(__pyx_v_self->mapping);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)</span>
|
|
2020
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
|
|
2021
|
+
__pyx_r = __pyx_t_1;
|
|
2022
|
+
__pyx_t_1 = 0;
|
|
2023
|
+
goto __pyx_L0;
|
|
2024
|
+
</pre><pre class="cython line score-0"> <span class="">103</span>: </pre>
|
|
2025
|
+
<pre class="cython line score-74" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">104</span>: def pop(self, key, default=None):</pre>
|
|
2026
|
+
<pre class='cython code score-74 '>/* Python wrapper */
|
|
2027
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_29pop(PyObject *__pyx_v_self,
|
|
2028
|
+
#if CYTHON_METH_FASTCALL
|
|
2029
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2030
|
+
#else
|
|
2031
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2032
|
+
#endif
|
|
2033
|
+
); /*proto*/
|
|
2034
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_28pop, "ClassDict.pop(self, key, default=None)");
|
|
2035
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_29pop = {"pop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_29pop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_28pop};
|
|
2036
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_29pop(PyObject *__pyx_v_self,
|
|
2037
|
+
#if CYTHON_METH_FASTCALL
|
|
2038
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2039
|
+
#else
|
|
2040
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2041
|
+
#endif
|
|
2042
|
+
) {
|
|
2043
|
+
PyObject *__pyx_v_key = 0;
|
|
2044
|
+
PyObject *__pyx_v_default = 0;
|
|
2045
|
+
#if !CYTHON_METH_FASTCALL
|
|
2046
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2047
|
+
#endif
|
|
2048
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2049
|
+
PyObject *__pyx_r = 0;
|
|
2050
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2051
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("pop (wrapper)", 0);
|
|
2052
|
+
#if !CYTHON_METH_FASTCALL
|
|
2053
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2054
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2055
|
+
#else
|
|
2056
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2057
|
+
#endif
|
|
2058
|
+
#endif
|
|
2059
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2060
|
+
{
|
|
2061
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0};
|
|
2062
|
+
PyObject* values[2] = {0,0};
|
|
2063
|
+
values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(((PyObject *)Py_None));
|
|
2064
|
+
if (__pyx_kwds) {
|
|
2065
|
+
Py_ssize_t kw_args;
|
|
2066
|
+
switch (__pyx_nargs) {
|
|
2067
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
2068
|
+
CYTHON_FALLTHROUGH;
|
|
2069
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2070
|
+
CYTHON_FALLTHROUGH;
|
|
2071
|
+
case 0: break;
|
|
2072
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2073
|
+
}
|
|
2074
|
+
kw_args = <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds);
|
|
2075
|
+
switch (__pyx_nargs) {
|
|
2076
|
+
case 0:
|
|
2077
|
+
if (likely((values[0] = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_key)) != 0)) {
|
|
2078
|
+
(void)<span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(values[0]);
|
|
2079
|
+
kw_args--;
|
|
2080
|
+
}
|
|
2081
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span>
|
|
2082
|
+
else goto __pyx_L5_argtuple_error;
|
|
2083
|
+
CYTHON_FALLTHROUGH;
|
|
2084
|
+
case 1:
|
|
2085
|
+
if (kw_args > 0) {
|
|
2086
|
+
PyObject* value = <span class='pyx_c_api'>__Pyx_GetKwValue_FASTCALL</span>(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default);
|
|
2087
|
+
if (value) { values[1] = <span class='pyx_c_api'>__Pyx_Arg_NewRef_FASTCALL</span>(value); kw_args--; }
|
|
2088
|
+
else if (unlikely(<span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span>
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
if (unlikely(kw_args > 0)) {
|
|
2092
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
2093
|
+
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pop") < 0)) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span>
|
|
2094
|
+
}
|
|
2095
|
+
} else {
|
|
2096
|
+
switch (__pyx_nargs) {
|
|
2097
|
+
case 2: values[1] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 1);
|
|
2098
|
+
CYTHON_FALLTHROUGH;
|
|
2099
|
+
case 1: values[0] = <span class='pyx_c_api'>__Pyx_Arg_FASTCALL</span>(__pyx_args, 0);
|
|
2100
|
+
break;
|
|
2101
|
+
default: goto __pyx_L5_argtuple_error;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
__pyx_v_key = values[0];
|
|
2105
|
+
__pyx_v_default = values[1];
|
|
2106
|
+
}
|
|
2107
|
+
goto __pyx_L6_skip;
|
|
2108
|
+
__pyx_L5_argtuple_error:;
|
|
2109
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("pop", 0, 1, 2, __pyx_nargs); <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L3_error)</span>
|
|
2110
|
+
__pyx_L6_skip:;
|
|
2111
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
2112
|
+
__pyx_L3_error:;
|
|
2113
|
+
{
|
|
2114
|
+
Py_ssize_t __pyx_temp;
|
|
2115
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2116
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2120
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2121
|
+
return NULL;
|
|
2122
|
+
__pyx_L4_argument_unpacking_done:;
|
|
2123
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_28pop(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
|
|
2124
|
+
|
|
2125
|
+
/* function exit code */
|
|
2126
|
+
{
|
|
2127
|
+
Py_ssize_t __pyx_temp;
|
|
2128
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
2129
|
+
<span class='pyx_c_api'>__Pyx_Arg_XDECREF_FASTCALL</span>(values[__pyx_temp]);
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2133
|
+
return __pyx_r;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_28pop(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
|
|
2137
|
+
PyObject *__pyx_v_value = NULL;
|
|
2138
|
+
PyObject *__pyx_r = NULL;
|
|
2139
|
+
/* … */
|
|
2140
|
+
/* function exit code */
|
|
2141
|
+
__pyx_L1_error:;
|
|
2142
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
2143
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
|
|
2144
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
|
|
2145
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2146
|
+
__pyx_r = NULL;
|
|
2147
|
+
__pyx_L0:;
|
|
2148
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_value);
|
|
2149
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2150
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2151
|
+
return __pyx_r;
|
|
2152
|
+
}
|
|
2153
|
+
/* … */
|
|
2154
|
+
__pyx_tuple__20 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_value);<span class='error_goto'> if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 104, __pyx_L1_error)</span>
|
|
2155
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__20);
|
|
2156
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__20);
|
|
2157
|
+
/* … */
|
|
2158
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_29pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_pop, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__21));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)</span>
|
|
2159
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2160
|
+
<span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsTuple</span>(__pyx_t_2, __pyx_tuple__11);
|
|
2161
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_pop, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 104, __pyx_L1_error)</span>
|
|
2162
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2163
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
2164
|
+
__pyx_codeobj__21 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_pop, 104, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 104, __pyx_L1_error)</span>
|
|
2165
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">105</span>: try:</pre>
|
|
2166
|
+
<pre class='cython code score-7 '> {
|
|
2167
|
+
/*try:*/ {
|
|
2168
|
+
/* … */
|
|
2169
|
+
}
|
|
2170
|
+
__pyx_L3_error:;
|
|
2171
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
2172
|
+
/* … */
|
|
2173
|
+
__pyx_L5_except_error:;
|
|
2174
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1);
|
|
2175
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2);
|
|
2176
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
|
2177
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);
|
|
2178
|
+
goto __pyx_L1_error;
|
|
2179
|
+
__pyx_L7_try_return:;
|
|
2180
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1);
|
|
2181
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2);
|
|
2182
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
|
2183
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);
|
|
2184
|
+
goto __pyx_L0;
|
|
2185
|
+
__pyx_L6_except_return:;
|
|
2186
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1);
|
|
2187
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2);
|
|
2188
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3);
|
|
2189
|
+
<span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);
|
|
2190
|
+
goto __pyx_L0;
|
|
2191
|
+
}
|
|
2192
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">106</span>: value = self[key]</pre>
|
|
2193
|
+
<pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetItem</span>(((PyObject *)__pyx_v_self), __pyx_v_key);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L3_error)</span>
|
|
2194
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
|
|
2195
|
+
__pyx_v_value = __pyx_t_4;
|
|
2196
|
+
__pyx_t_4 = 0;
|
|
2197
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">107</span>: del self[key]</pre>
|
|
2198
|
+
<pre class='cython code score-5 '> if (unlikely((<span class='py_c_api'>PyObject_DelItem</span>(((PyObject *)__pyx_v_self), __pyx_v_key) < 0))) <span class='error_goto'>__PYX_ERR(0, 107, __pyx_L3_error)</span>
|
|
2199
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">108</span>: return value</pre>
|
|
2200
|
+
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2201
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_value);
|
|
2202
|
+
__pyx_r = __pyx_v_value;
|
|
2203
|
+
goto __pyx_L7_try_return;
|
|
2204
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">109</span>: except KeyError:</pre>
|
|
2205
|
+
<pre class='cython code score-6 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_KeyError);
|
|
2206
|
+
if (__pyx_t_5) {
|
|
2207
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2208
|
+
if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) <span class='error_goto'>__PYX_ERR(0, 109, __pyx_L5_except_error)</span>
|
|
2209
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_4);
|
|
2210
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_6);
|
|
2211
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_7);
|
|
2212
|
+
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">110</span>: return default</pre>
|
|
2213
|
+
<pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2214
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_default);
|
|
2215
|
+
__pyx_r = __pyx_v_default;
|
|
2216
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
2217
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0;
|
|
2218
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0;
|
|
2219
|
+
goto __pyx_L6_except_return;
|
|
2220
|
+
}
|
|
2221
|
+
goto __pyx_L5_except_error;
|
|
2222
|
+
</pre><pre class="cython line score-0"> <span class="">111</span>: </pre>
|
|
2223
|
+
<pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">112</span>: def clear(self):</pre>
|
|
2224
|
+
<pre class='cython code score-31 '>/* Python wrapper */
|
|
2225
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_31clear(PyObject *__pyx_v_self,
|
|
2226
|
+
#if CYTHON_METH_FASTCALL
|
|
2227
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2228
|
+
#else
|
|
2229
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2230
|
+
#endif
|
|
2231
|
+
); /*proto*/
|
|
2232
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_30clear, "ClassDict.clear(self)");
|
|
2233
|
+
static PyMethodDef __pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_31clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_31clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9datamodel_4libs_7mapping_9ClassDict_30clear};
|
|
2234
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_31clear(PyObject *__pyx_v_self,
|
|
2235
|
+
#if CYTHON_METH_FASTCALL
|
|
2236
|
+
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
2237
|
+
#else
|
|
2238
|
+
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
2239
|
+
#endif
|
|
2240
|
+
) {
|
|
2241
|
+
#if !CYTHON_METH_FASTCALL
|
|
2242
|
+
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
2243
|
+
#endif
|
|
2244
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2245
|
+
PyObject *__pyx_r = 0;
|
|
2246
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2247
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("clear (wrapper)", 0);
|
|
2248
|
+
#if !CYTHON_METH_FASTCALL
|
|
2249
|
+
#if CYTHON_ASSUME_SAFE_MACROS
|
|
2250
|
+
__pyx_nargs = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args);
|
|
2251
|
+
#else
|
|
2252
|
+
__pyx_nargs = <span class='py_c_api'>PyTuple_Size</span>(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
|
|
2253
|
+
#endif
|
|
2254
|
+
#endif
|
|
2255
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_FASTCALL</span>(__pyx_args, __pyx_nargs);
|
|
2256
|
+
if (unlikely(__pyx_nargs > 0)) {
|
|
2257
|
+
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("clear", 1, 0, 0, __pyx_nargs); return NULL;}
|
|
2258
|
+
if (unlikely(__pyx_kwds) && <span class='pyx_c_api'>__Pyx_NumKwargs_FASTCALL</span>(__pyx_kwds) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "clear", 0))) return NULL;
|
|
2259
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_30clear(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
2260
|
+
|
|
2261
|
+
/* function exit code */
|
|
2262
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2263
|
+
return __pyx_r;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_30clear(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
2267
|
+
PyObject *__pyx_r = NULL;
|
|
2268
|
+
/* … */
|
|
2269
|
+
/* function exit code */
|
|
2270
|
+
__pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
2271
|
+
goto __pyx_L0;
|
|
2272
|
+
__pyx_L1_error:;
|
|
2273
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
2274
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2275
|
+
__pyx_r = NULL;
|
|
2276
|
+
__pyx_L0:;
|
|
2277
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2278
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2279
|
+
return __pyx_r;
|
|
2280
|
+
}
|
|
2281
|
+
static PyObject *__pyx_gb_9datamodel_4libs_7mapping_9ClassDict_34generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
|
|
2282
|
+
/* … */
|
|
2283
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_New</span>(&__pyx_mdef_9datamodel_4libs_7mapping_9ClassDict_31clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ClassDict_clear, NULL, __pyx_n_s_datamodel_libs_mapping, __pyx_d, ((PyObject *)__pyx_codeobj__22));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)</span>
|
|
2284
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2285
|
+
if (<span class='pyx_c_api'>__Pyx_SetItemOnTypeDict</span>((PyObject *)__pyx_ptype_9datamodel_4libs_7mapping_ClassDict, __pyx_n_s_clear, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 112, __pyx_L1_error)</span>
|
|
2286
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2287
|
+
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_9datamodel_4libs_7mapping_ClassDict);
|
|
2288
|
+
/* … */
|
|
2289
|
+
__pyx_codeobj__22 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_datamodel_libs_mapping_pyx, __pyx_n_s_clear, 112, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 112, __pyx_L1_error)</span>
|
|
2290
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">113</span>: self.mapping.clear()</pre>
|
|
2291
|
+
<pre class='cython code score-7 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
2292
|
+
<span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
|
|
2293
|
+
<span class='error_goto'>__PYX_ERR(0, 113, __pyx_L1_error)</span>
|
|
2294
|
+
}
|
|
2295
|
+
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyDict_Clear</span>(__pyx_v_self->mapping);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error)</span>
|
|
2296
|
+
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">114</span>: self._columns = []</pre>
|
|
2297
|
+
<pre class='cython code score-6 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)</span>
|
|
2298
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2299
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
|
|
2300
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_columns);
|
|
2301
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_columns);
|
|
2302
|
+
__pyx_v_self->_columns = ((PyObject*)__pyx_t_2);
|
|
2303
|
+
__pyx_t_2 = 0;
|
|
2304
|
+
</pre><pre class="cython line score-0"> <span class="">115</span>: </pre>
|
|
2305
|
+
<pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">116</span>: def __iter__(self) -> Iterator:</pre>
|
|
2306
|
+
<pre class='cython code score-26 '>/* Python wrapper */
|
|
2307
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_33__iter__(PyObject *__pyx_v_self); /*proto*/
|
|
2308
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_33__iter__(PyObject *__pyx_v_self) {
|
|
2309
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2310
|
+
PyObject *__pyx_r = 0;
|
|
2311
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2312
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__iter__ (wrapper)", 0);
|
|
2313
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
2314
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_32__iter__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self));
|
|
2315
|
+
|
|
2316
|
+
/* function exit code */
|
|
2317
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2318
|
+
return __pyx_r;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_32__iter__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self) {
|
|
2322
|
+
struct __pyx_obj_9datamodel_4libs_7mapping___pyx_scope_struct____iter__ *__pyx_cur_scope;
|
|
2323
|
+
PyObject *__pyx_r = NULL;
|
|
2324
|
+
__pyx_cur_scope = (struct __pyx_obj_9datamodel_4libs_7mapping___pyx_scope_struct____iter__ *)__pyx_tp_new_9datamodel_4libs_7mapping___pyx_scope_struct____iter__(__pyx_ptype_9datamodel_4libs_7mapping___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
|
|
2325
|
+
if (unlikely(!__pyx_cur_scope)) {
|
|
2326
|
+
__pyx_cur_scope = ((struct __pyx_obj_9datamodel_4libs_7mapping___pyx_scope_struct____iter__ *)Py_None);
|
|
2327
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None);
|
|
2328
|
+
<span class='error_goto'>__PYX_ERR(0, 116, __pyx_L1_error)</span>
|
|
2329
|
+
} else {
|
|
2330
|
+
<span class='refnanny'>__Pyx_GOTREF</span>((PyObject *)__pyx_cur_scope);
|
|
2331
|
+
}
|
|
2332
|
+
__pyx_cur_scope->__pyx_v_self = __pyx_v_self;
|
|
2333
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>((PyObject *)__pyx_cur_scope->__pyx_v_self);
|
|
2334
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>((PyObject *)__pyx_cur_scope->__pyx_v_self);
|
|
2335
|
+
{
|
|
2336
|
+
__pyx_CoroutineObject *gen = <span class='pyx_c_api'>__Pyx_Generator_New</span>((__pyx_coroutine_body_t) __pyx_gb_9datamodel_4libs_7mapping_9ClassDict_34generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_ClassDict___iter, __pyx_n_s_datamodel_libs_mapping);<span class='error_goto'> if (unlikely(!gen)) __PYX_ERR(0, 116, __pyx_L1_error)</span>
|
|
2337
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_cur_scope);
|
|
2338
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2339
|
+
return (PyObject *) gen;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
/* function exit code */
|
|
2343
|
+
__pyx_L1_error:;
|
|
2344
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2345
|
+
__pyx_r = NULL;
|
|
2346
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>((PyObject *)__pyx_cur_scope);
|
|
2347
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2348
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2349
|
+
return __pyx_r;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
static PyObject *__pyx_gb_9datamodel_4libs_7mapping_9ClassDict_34generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
|
|
2353
|
+
{
|
|
2354
|
+
PyObject *__pyx_r = NULL;
|
|
2355
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2356
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__iter__", 0);
|
|
2357
|
+
__pyx_L3_first_run:;
|
|
2358
|
+
if (unlikely(!__pyx_sent_value)) <span class='error_goto'>__PYX_ERR(0, 116, __pyx_L1_error)</span>
|
|
2359
|
+
/* … */
|
|
2360
|
+
/* function exit code */
|
|
2361
|
+
<span class='py_c_api'>PyErr_SetNone</span>(PyExc_StopIteration);
|
|
2362
|
+
goto __pyx_L0;
|
|
2363
|
+
__pyx_L1_error:;
|
|
2364
|
+
<span class='pyx_c_api'>__Pyx_Generator_Replace_StopIteration</span>(0);
|
|
2365
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2366
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
2367
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2368
|
+
__pyx_L0:;
|
|
2369
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = 0;
|
|
2370
|
+
#if !CYTHON_USE_EXC_INFO_STACK
|
|
2371
|
+
<span class='pyx_c_api'>__Pyx_Coroutine_ResetAndClearException</span>(__pyx_generator);
|
|
2372
|
+
#endif
|
|
2373
|
+
__pyx_generator->resume_label = -1;
|
|
2374
|
+
<span class='pyx_c_api'>__Pyx_Coroutine_clear</span>((PyObject*)__pyx_generator);
|
|
2375
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2376
|
+
return __pyx_r;
|
|
2377
|
+
}
|
|
2378
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">117</span>: for value in self.mapping:</pre>
|
|
2379
|
+
<pre class='cython code score-7 '> __pyx_t_2 = 0;
|
|
2380
|
+
if (unlikely(__pyx_cur_scope->__pyx_v_self->mapping == Py_None)) {
|
|
2381
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
2382
|
+
<span class='error_goto'>__PYX_ERR(0, 117, __pyx_L1_error)</span>
|
|
2383
|
+
}
|
|
2384
|
+
__pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_self->mapping, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4));<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)</span>
|
|
2385
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2386
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1);
|
|
2387
|
+
__pyx_t_1 = __pyx_t_5;
|
|
2388
|
+
__pyx_t_5 = 0;
|
|
2389
|
+
while (1) {
|
|
2390
|
+
__pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, NULL, NULL, __pyx_t_4);
|
|
2391
|
+
if (unlikely(__pyx_t_6 == 0)) break;
|
|
2392
|
+
if (unlikely(__pyx_t_6 == -1)) <span class='error_goto'>__PYX_ERR(0, 117, __pyx_L1_error)</span>
|
|
2393
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2394
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_cur_scope->__pyx_v_value);
|
|
2395
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_cur_scope->__pyx_v_value, __pyx_t_5);
|
|
2396
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
2397
|
+
__pyx_t_5 = 0;
|
|
2398
|
+
</pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">118</span>: yield value</pre>
|
|
2399
|
+
<pre class='cython code score-4 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_cur_scope->__pyx_v_value);
|
|
2400
|
+
__pyx_r = __pyx_cur_scope->__pyx_v_value;
|
|
2401
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1);
|
|
2402
|
+
__pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
|
|
2403
|
+
__pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
|
|
2404
|
+
__pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
|
|
2405
|
+
__pyx_cur_scope->__pyx_t_3 = __pyx_t_4;
|
|
2406
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2407
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2408
|
+
<span class='pyx_c_api'>__Pyx_Coroutine_ResetAndClearException</span>(__pyx_generator);
|
|
2409
|
+
/* return from generator, yielding value */
|
|
2410
|
+
__pyx_generator->resume_label = 1;
|
|
2411
|
+
return __pyx_r;
|
|
2412
|
+
__pyx_L6_resume_from_yield:;
|
|
2413
|
+
__pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
|
|
2414
|
+
__pyx_cur_scope->__pyx_t_0 = 0;
|
|
2415
|
+
<span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_1);
|
|
2416
|
+
__pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
|
|
2417
|
+
__pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
|
|
2418
|
+
__pyx_t_4 = __pyx_cur_scope->__pyx_t_3;
|
|
2419
|
+
if (unlikely(!__pyx_sent_value)) <span class='error_goto'>__PYX_ERR(0, 118, __pyx_L1_error)</span>
|
|
2420
|
+
}
|
|
2421
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
|
|
2422
|
+
CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
|
|
2423
|
+
</pre><pre class="cython line score-0"> <span class="">119</span>: </pre>
|
|
2424
|
+
<pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">120</span>: def __getattr__(self, attr: str) -> Any:</pre>
|
|
2425
|
+
<pre class='cython code score-9 '>/* Python wrapper */
|
|
2426
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_36__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
|
|
2427
|
+
<span class='py_macro_api'>PyDoc_STRVAR</span>(__pyx_doc_9datamodel_4libs_7mapping_9ClassDict_35__getattr__, "\n Attributes for dict keys\n ");
|
|
2428
|
+
#if CYTHON_UPDATE_DESCRIPTOR_DOC
|
|
2429
|
+
struct wrapperbase __pyx_wrapperbase_9datamodel_4libs_7mapping_9ClassDict_35__getattr__;
|
|
2430
|
+
#endif
|
|
2431
|
+
static PyObject *__pyx_pw_9datamodel_4libs_7mapping_9ClassDict_36__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
|
|
2432
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2433
|
+
PyObject *__pyx_r = 0;
|
|
2434
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2435
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__getattr__ (wrapper)", 0);
|
|
2436
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
2437
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_attr), (&PyUnicode_Type), 0, "attr", 1))) <span class='error_goto'>__PYX_ERR(0, 120, __pyx_L1_error)</span>
|
|
2438
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_35__getattr__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), ((PyObject*)__pyx_v_attr));
|
|
2439
|
+
int __pyx_lineno = 0;
|
|
2440
|
+
const char *__pyx_filename = NULL;
|
|
2441
|
+
int __pyx_clineno = 0;
|
|
2442
|
+
|
|
2443
|
+
/* function exit code */
|
|
2444
|
+
goto __pyx_L0;
|
|
2445
|
+
__pyx_L1_error:;
|
|
2446
|
+
__pyx_r = NULL;
|
|
2447
|
+
__pyx_L0:;
|
|
2448
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2449
|
+
return __pyx_r;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
static PyObject *__pyx_pf_9datamodel_4libs_7mapping_9ClassDict_35__getattr__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_attr) {
|
|
2453
|
+
PyObject *__pyx_r = NULL;
|
|
2454
|
+
/* … */
|
|
2455
|
+
/* function exit code */
|
|
2456
|
+
__pyx_L1_error:;
|
|
2457
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
2458
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5);
|
|
2459
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2460
|
+
__pyx_r = NULL;
|
|
2461
|
+
__pyx_L0:;
|
|
2462
|
+
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
|
|
2463
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2464
|
+
return __pyx_r;
|
|
2465
|
+
}
|
|
2466
|
+
</pre><pre class="cython line score-0"> <span class="">121</span>: """</pre>
|
|
2467
|
+
<pre class="cython line score-0"> <span class="">122</span>: Attributes for dict keys</pre>
|
|
2468
|
+
<pre class="cython line score-0"> <span class="">123</span>: """</pre>
|
|
2469
|
+
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">124</span>: if attr in self.mapping:</pre>
|
|
2470
|
+
<pre class='cython code score-7 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
2471
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
2472
|
+
<span class='error_goto'>__PYX_ERR(0, 124, __pyx_L1_error)</span>
|
|
2473
|
+
}
|
|
2474
|
+
__pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_v_attr, __pyx_v_self->mapping, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 124, __pyx_L1_error)</span>
|
|
2475
|
+
if (__pyx_t_1) {
|
|
2476
|
+
/* … */
|
|
2477
|
+
}
|
|
2478
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">125</span>: return self.mapping[attr]</pre>
|
|
2479
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2480
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
2481
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
2482
|
+
<span class='error_goto'>__PYX_ERR(0, 125, __pyx_L1_error)</span>
|
|
2483
|
+
}
|
|
2484
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_self->mapping, __pyx_v_attr);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)</span>
|
|
2485
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2486
|
+
__pyx_r = __pyx_t_2;
|
|
2487
|
+
__pyx_t_2 = 0;
|
|
2488
|
+
goto __pyx_L0;
|
|
2489
|
+
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">126</span>: elif attr in self._columns:</pre>
|
|
2490
|
+
<pre class='cython code score-2 '> __pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PySequence_ContainsTF</span>(__pyx_v_attr, __pyx_v_self->_columns, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 126, __pyx_L1_error)</span>
|
|
2491
|
+
if (__pyx_t_1) {
|
|
2492
|
+
/* … */
|
|
2493
|
+
}
|
|
2494
|
+
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">127</span>: return self.mapping[attr]</pre>
|
|
2495
|
+
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
|
|
2496
|
+
if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
2497
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable");
|
|
2498
|
+
<span class='error_goto'>__PYX_ERR(0, 127, __pyx_L1_error)</span>
|
|
2499
|
+
}
|
|
2500
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_GetItem</span>(__pyx_v_self->mapping, __pyx_v_attr);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)</span>
|
|
2501
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2502
|
+
__pyx_r = __pyx_t_2;
|
|
2503
|
+
__pyx_t_2 = 0;
|
|
2504
|
+
goto __pyx_L0;
|
|
2505
|
+
</pre><pre class="cython line score-0"> <span class="">128</span>: </pre>
|
|
2506
|
+
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">129</span>: raise KeyError(</pre>
|
|
2507
|
+
<pre class='cython code score-6 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_KeyError, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)</span>
|
|
2508
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2509
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0;
|
|
2510
|
+
<span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0);
|
|
2511
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2512
|
+
<span class='error_goto'>__PYX_ERR(0, 129, __pyx_L1_error)</span>
|
|
2513
|
+
</pre><pre class="cython line score-34" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">130</span>: f"User Error: invalid field name {attr} on {self.mapping!r}"</pre>
|
|
2514
|
+
<pre class='cython code score-34 '> __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)</span>
|
|
2515
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2516
|
+
__pyx_t_3 = 0;
|
|
2517
|
+
__pyx_t_4 = 127;
|
|
2518
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_User_Error_invalid_field_name);
|
|
2519
|
+
__pyx_t_3 += 31;
|
|
2520
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_User_Error_invalid_field_name);
|
|
2521
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_kp_u_User_Error_invalid_field_name);
|
|
2522
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_attr);
|
|
2523
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_v_attr) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_v_attr) : __pyx_t_4;
|
|
2524
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_v_attr);
|
|
2525
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_attr);
|
|
2526
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_v_attr);
|
|
2527
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_u_on);
|
|
2528
|
+
__pyx_t_3 += 4;
|
|
2529
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_kp_u_on);
|
|
2530
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 2, __pyx_kp_u_on);
|
|
2531
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_FormatSimpleAndDecref</span>(<span class='py_c_api'>PyObject_Repr</span>(__pyx_v_self->mapping), __pyx_empty_unicode);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)</span>
|
|
2532
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2533
|
+
__pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) > __pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyUnicode_MAX_CHAR_VALUE</span>(__pyx_t_5) : __pyx_t_4;
|
|
2534
|
+
__pyx_t_3 += <span class='pyx_c_api'>__Pyx_PyUnicode_GET_LENGTH</span>(__pyx_t_5);
|
|
2535
|
+
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
|
|
2536
|
+
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 3, __pyx_t_5);
|
|
2537
|
+
__pyx_t_5 = 0;
|
|
2538
|
+
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyUnicode_Join</span>(__pyx_t_2, 4, __pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)</span>
|
|
2539
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
|
|
2540
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2541
|
+
</pre><pre class="cython line score-0"> <span class="">131</span>: )</pre>
|
|
2542
|
+
<pre class="cython line score-0"> <span class="">132</span>: </pre>
|
|
2543
|
+
<pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">133</span>: def __delattr__(self, name: str) -> None:</pre>
|
|
2544
|
+
<pre class='cython code score-9 '>/* Python wrapper */
|
|
2545
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_38__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
|
|
2546
|
+
static int __pyx_pw_9datamodel_4libs_7mapping_9ClassDict_38__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
|
|
2547
|
+
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
2548
|
+
int __pyx_r;
|
|
2549
|
+
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
|
|
2550
|
+
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("__delattr__ (wrapper)", 0);
|
|
2551
|
+
__pyx_kwvalues = <span class='pyx_c_api'>__Pyx_KwValues_VARARGS</span>(__pyx_args, __pyx_nargs);
|
|
2552
|
+
if (unlikely(!<span class='pyx_c_api'>__Pyx_ArgTypeTest</span>(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 0, "name", 1))) <span class='error_goto'>__PYX_ERR(0, 133, __pyx_L1_error)</span>
|
|
2553
|
+
__pyx_r = __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_37__delattr__(((struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *)__pyx_v_self), ((PyObject*)__pyx_v_name));
|
|
2554
|
+
int __pyx_lineno = 0;
|
|
2555
|
+
const char *__pyx_filename = NULL;
|
|
2556
|
+
int __pyx_clineno = 0;
|
|
2557
|
+
|
|
2558
|
+
/* function exit code */
|
|
2559
|
+
goto __pyx_L0;
|
|
2560
|
+
__pyx_L1_error:;
|
|
2561
|
+
__pyx_r = -1;
|
|
2562
|
+
__pyx_L0:;
|
|
2563
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2564
|
+
return __pyx_r;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
static int __pyx_pf_9datamodel_4libs_7mapping_9ClassDict_37__delattr__(struct __pyx_obj_9datamodel_4libs_7mapping_ClassDict *__pyx_v_self, PyObject *__pyx_v_name) {
|
|
2568
|
+
int __pyx_r;
|
|
2569
|
+
/* … */
|
|
2570
|
+
/* function exit code */
|
|
2571
|
+
__pyx_r = 0;
|
|
2572
|
+
goto __pyx_L0;
|
|
2573
|
+
__pyx_L1_error:;
|
|
2574
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
|
|
2575
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3);
|
|
2576
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4);
|
|
2577
|
+
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("datamodel.libs.mapping.ClassDict.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
2578
|
+
__pyx_r = -1;
|
|
2579
|
+
__pyx_L0:;
|
|
2580
|
+
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
|
|
2581
|
+
return __pyx_r;
|
|
2582
|
+
}
|
|
2583
|
+
</pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">134</span>: if name in self.mapping:</pre>
|
|
2584
|
+
<pre class='cython code score-7 '> if (unlikely(__pyx_v_self->mapping == Py_None)) {
|
|
2585
|
+
<span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable");
|
|
2586
|
+
<span class='error_goto'>__PYX_ERR(0, 134, __pyx_L1_error)</span>
|
|
2587
|
+
}
|
|
2588
|
+
__pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_v_name, __pyx_v_self->mapping, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) <span class='error_goto'>__PYX_ERR(0, 134, __pyx_L1_error)</span>
|
|
2589
|
+
if (__pyx_t_1) {
|
|
2590
|
+
/* … */
|
|
2591
|
+
}
|
|
2592
|
+
</pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">135</span>: self.pop(name, None)</pre>
|
|
2593
|
+
<pre class='cython code score-17 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_pop);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)</span>
|
|
2594
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
|
|
2595
|
+
__pyx_t_4 = NULL;
|
|
2596
|
+
__pyx_t_5 = 0;
|
|
2597
|
+
#if CYTHON_UNPACK_METHODS
|
|
2598
|
+
if (likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) {
|
|
2599
|
+
__pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3);
|
|
2600
|
+
if (likely(__pyx_t_4)) {
|
|
2601
|
+
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3);
|
|
2602
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4);
|
|
2603
|
+
<span class='pyx_macro_api'>__Pyx_INCREF</span>(function);
|
|
2604
|
+
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function);
|
|
2605
|
+
__pyx_t_5 = 1;
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
#endif
|
|
2609
|
+
{
|
|
2610
|
+
PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_name, Py_None};
|
|
2611
|
+
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_FastCall</span>(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
|
|
2612
|
+
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0;
|
|
2613
|
+
if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 135, __pyx_L1_error)</span>
|
|
2614
|
+
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
|
|
2615
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
|
|
2616
|
+
}
|
|
2617
|
+
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
|
|
2618
|
+
</pre></div></body></html>
|