Initial version
[cython.git] / ToDo.txt
1 DONE - Pointer-to-function types.
2
3 DONE - Nested declarators.
4
5 DONE - Varargs C func defs and calls.
6
7 DONE - * and ** args in Python func defs.
8
9 DONE - Default argument values.
10
11 DONE - Tracebacks.
12
13 DONE - Disallow creating char * from Python temporary anywhere
14        (not just on assignment).
15
16 DONE - Module and function and class doc strings.
17
18 DONE - Predeclare C functions.
19
20 DONE - Constant expressions.
21
22 DONE - Forward C struct declarations.
23
24 DONE - Prefix & operator.
25
26 DONE - Get rid of auto string->char coercion and
27        add a c'X' syntax for char literals.
28
29 DONE - Cascaded assignments (a = b = c).
30
31 DONE - 'include' statement for including other Pyrex files.
32
33 DONE - Add command line option for specifying name of generated C file.
34
35 DONE - Add 'else' clause to try-except.
36
37 DONE - Allow extension types to be declared "public" so they
38        can be accessed from another Pyrex module or a C file.
39
40 DONE - Don't try to generate objstruct definition for external
41        extension type declared without suite (treat as though
42        declared with empty suite).
43
44 DONE - Implement two-argument form of 'assert' statement.
45
46 Const types.
47
48 Tuple/list construction: Evaluate & store items one at a time?
49
50 Varargs argument traversal.
51
52 Use PyDict_SetItemString to build keyword arg dicts?
53 (Or wait until names are interned.)
54
55 Intern names.
56
57 print >>file
58
59 abs() and anything similar.
60
61 Semicolon-separated statement lists.
62
63 Optional semicolons after C declarations.
64
65 Multiple C declarations on one line?
66
67 Optimise return without value outside of try-finally.
68
69 exec statement.
70
71 from ... import statement.
72
73 Use iterator protocol for unpacking.
74
75 Save & restore exception being handled on function entry/exit.
76
77 In-place operators (+=, etc).
78
79 Constant declarations. Syntax?
80
81 DONE - Some way for C functions to signal Python errors?
82
83 Check for lack of return with value in non-void C functions?
84
85 Allow 'pass' in struct/union/enum definition.
86
87 Make C structs callable as constructors.
88
89 DONE - Provide way of specifying C names.
90
91 DONE - Public cdefs.
92
93 When calling user __dealloc__ func, save & restore exception.
94
95 DONE - Forward declaration of extension types.
96
97 Complex number parsetuple format?
98
99 DONE - long long type
100
101 DONE - long double type?
102
103 Windows __fooblarg function declaration things.
104
105 Generate type, var and func declarations in the same order that
106 they appear in the source file.
107
108 Provide a way of declaring a C function as returning a
109 borrowed Python reference.
110
111 Provide a way of specifying whether a Python object obtained
112 by casting a pointer should be treated as a new reference
113 or not.
114
115 Optimize integer for-loops.
116
117 Make sizeof() take types as well as variables.
118
119 Allow "unsigned" to be used alone as a type name.
120
121 Allow duplicate declarations, at least in extern-from.
122
123 Do something about installing proper version of pyrexc
124 script according to platform in setup.py.
125
126 DONE - Add "-o filename" command line option to unix/dos versions.
127
128 Recognise #line directives?
129
130 Catch floating point exceptions?
131
132 Check that forward-declared non-external extension types 
133 are defined.
134
135 Generate type test when casting from one Python type
136 to another.
137
138 Generate a Pyrex include file for public declarations
139 as well as a C one.
140
141 Syntax for defining indefinite-sized int & float types.
142
143 Allow ranges of exception values.
144
145 Support "complex double" and "complex float"?
146
147 Allow module-level Python variables to be declared extern.
148
149 Consider:
150 >cdef extern from "foo.h":
151 >    int dosomething() except -1 raise MyException
152
153 Properties for Python types.
154
155 DONE - Properties for extension types.
156
157 Find a way to make classmethod and staticmethod work better.
158
159 DONE - Document workarounds for classmethod and staticmethod.
160
161 Statically initialised C arrays & structs.
162
163 Reduce generation of unused vars and unreachable code?
164
165 Support for acquiring and releasing GIL.
166
167 Make docstrings of extension type special methods work.
168
169 Treat result of getting C attribute of extension type as non-ephemeral.
170
171 Make None a reserved identifier.
172
173 Teach it about builtin functions that correspond to
174 Python/C API calls.
175
176 Teach it about common builtin types.
177
178 Option for generating a main() function?
179
180 DONE - Allow an extension type to inherit from another type.
181
182 Do something about external C functions declared as returning
183 const * types?
184
185 Use PyString_FromStringAndSize for string literals?
186
187 DONE - C functions as methods of extension types.
188
189 What to do about __name__ etc. attributes of a module (they are
190 currently assumed to be built-in names).
191
192 Use PyDict_GetItem etc. on module & builtins dicts for speed.
193
194 Intern all string literals used as Python strings?
195 [Koshy <jkoshy@freebsd.org>]
196
197 Make extension types weak-referenceable.
198 [Matthias Baas <baas@ira.uka.de>]
199
200 Make 'pass' work in the body of an extern-from struct
201 or union.
202
203 Disallow a filename which results in an illegal identifier when
204 used as a module name.
205
206 Use ctypedef names.
207
208 Provide an easy way of exposing a set of enum values as Python names.
209 [John J Lee <jjl@pobox.com>]
210
211 Prevent user from returning a value from special methods that
212 return an error indicator only.
213
214 Use PyObject_TypeCheck instead of PyObject_IsInstance?
215
216 Allow * in cimport? [John J Lee <jjl@pobox.com>]
217
218 FAQ: Q. Pyrex says my extension type object has no attribute 'rhubarb', but
219      I know it does.
220
221      A. Have you declared the type at the point where you're using it?
222
223 Eliminate lvalue casts! (Illegal in C++, also disallowed by some C compilers)
224 [Matthias Baas <baas@ira.uka.de>]
225
226 Make Python class construction work more like it does in Python.
227
228 Give the right module name to Python classes.
229
230 Command line switch for full pathnames in backtraces?
231
232 Use PyString_FromStringAndSize on string literals containing
233 nulls.
234
235 Peephole optimisation? [Vladislav Bulatov <vrbulatov@list.ru>]
236
237 Avoid PyArg_ParseTuple call when a function takes no positional args.
238
239 Omit incref/decref of arguments that are not assigned to?
240
241 Can a faster way of instantiating extension types be found?
242
243 Disallow declaring a special method of an extension type with
244 'cdef' instead of 'def'.
245
246 Use PySequence_GetItem instead of PyObject_GetItem when index
247 is an integer.
248
249 If a __getitem__ method is declared with an int index, use the
250 sq_item slot instead of the mp_subscript slot.
251
252 Provide some way of controlling the argument list passed to
253 an extension type's base __new__ method?
254 [Alain Pointdexter <alainpoint@yahoo.fr>]
255
256 Rename __new__ in extension types to __alloc__.
257
258 Implement a true __new__ for extension types.
259
260 Way to provide constructors for extension types that are not
261 available to Python and can accept C types directly?
262
263 Support generators by turning them into extension types?
264
265 List comprehensions.
266
267 Variable declarations inside inner code blocks?
268
269 Initial values when declaring variables?
270
271 Do something about __stdcall.
272
273 Support class methods in extension types using METH_CLASS flag.
274
275 Disallow defaulting types to 'object' in C declarations?
276
277 C globals with static initialisers.
278
279 Find a way of providing C-only initialisers for extension types.
280
281 Metaclasses for extension types?
282
283 Make extension types use Py_TPFLAGS_HEAPTYPE so their __module__
284 will get set dynamically?