1 See http://trac.cython.org/cython_trac and http://wiki.cython.org/enhancements
4 -- The Original Pyrex Todo List --
6 DONE - Pointer-to-function types.
8 DONE - Nested declarators.
10 DONE - Varargs C func defs and calls.
12 DONE - * and ** args in Python func defs.
14 DONE - Default argument values.
18 DONE - Disallow creating char * from Python temporary anywhere
19 (not just on assignment).
21 DONE - Module and function and class doc strings.
23 DONE - Predeclare C functions.
25 DONE - Constant expressions.
27 DONE - Forward C struct declarations.
29 DONE - Prefix & operator.
31 DONE - Get rid of auto string->char coercion and
32 add a c'X' syntax for char literals.
34 DONE - Cascaded assignments (a = b = c).
36 DONE - 'include' statement for including other Pyrex files.
38 DONE - Add command line option for specifying name of generated C file.
40 DONE - Add 'else' clause to try-except.
42 DONE - Allow extension types to be declared "public" so they
43 can be accessed from another Pyrex module or a C file.
45 DONE - Don't try to generate objstruct definition for external
46 extension type declared without suite (treat as though
47 declared with empty suite).
49 DONE - Implement two-argument form of 'assert' statement.
53 Tuple/list construction: Evaluate & store items one at a time?
55 Varargs argument traversal.
57 Use PyDict_SetItemString to build keyword arg dicts?
58 (Or wait until names are interned.)
64 abs() and anything similar.
66 Semicolon-separated statement lists.
68 Optional semicolons after C declarations.
70 Multiple C declarations on one line?
72 Optimise return without value outside of try-finally.
76 from ... import statement.
78 Use iterator protocol for unpacking.
80 Save & restore exception being handled on function entry/exit.
82 In-place operators (+=, etc).
84 Constant declarations. Syntax?
86 DONE - Some way for C functions to signal Python errors?
88 Check for lack of return with value in non-void C functions?
90 Allow 'pass' in struct/union/enum definition.
92 Make C structs callable as constructors.
94 DONE - Provide way of specifying C names.
98 When calling user __dealloc__ func, save & restore exception.
100 DONE - Forward declaration of extension types.
102 Complex number parsetuple format?
104 DONE - long long type
106 DONE - long double type?
108 Windows __fooblarg function declaration things.
110 Generate type, var and func declarations in the same order that
111 they appear in the source file.
113 Provide a way of declaring a C function as returning a
114 borrowed Python reference.
116 Provide a way of specifying whether a Python object obtained
117 by casting a pointer should be treated as a new reference
120 Optimize integer for-loops.
122 Make sizeof() take types as well as variables.
124 Allow "unsigned" to be used alone as a type name.
126 Allow duplicate declarations, at least in extern-from.
128 Do something about installing proper version of pyrexc
129 script according to platform in setup.py.
131 DONE - Add "-o filename" command line option to unix/dos versions.
133 Recognise #line directives?
135 Catch floating point exceptions?
137 Check that forward-declared non-external extension types
140 Generate type test when casting from one Python type
143 Generate a Pyrex include file for public declarations
146 Syntax for defining indefinite-sized int & float types.
148 Allow ranges of exception values.
150 Support "complex double" and "complex float"?
152 Allow module-level Python variables to be declared extern.
155 >cdef extern from "foo.h":
156 > int dosomething() except -1 raise MyException
158 Properties for Python types.
160 DONE - Properties for extension types.
162 Find a way to make classmethod and staticmethod work better.
164 DONE - Document workarounds for classmethod and staticmethod.
166 Statically initialised C arrays & structs.
168 Reduce generation of unused vars and unreachable code?
170 Support for acquiring and releasing GIL.
172 Make docstrings of extension type special methods work.
174 Treat result of getting C attribute of extension type as non-ephemeral.
176 Make None a reserved identifier.
178 Teach it about builtin functions that correspond to
181 Teach it about common builtin types.
183 Option for generating a main() function?
185 DONE - Allow an extension type to inherit from another type.
187 Do something about external C functions declared as returning
190 Use PyString_FromStringAndSize for string literals?
192 DONE - C functions as methods of extension types.
194 What to do about __name__ etc. attributes of a module (they are
195 currently assumed to be built-in names).
197 Use PyDict_GetItem etc. on module & builtins dicts for speed.
199 Intern all string literals used as Python strings?
200 [Koshy <jkoshy@freebsd.org>]
202 Make extension types weak-referenceable.
203 [Matthias Baas <baas@ira.uka.de>]
205 Make 'pass' work in the body of an extern-from struct
208 Disallow a filename which results in an illegal identifier when
209 used as a module name.
213 Provide an easy way of exposing a set of enum values as Python names.
214 [John J Lee <jjl@pobox.com>]
216 Prevent user from returning a value from special methods that
217 return an error indicator only.
219 Use PyObject_TypeCheck instead of PyObject_IsInstance?
221 Allow * in cimport? [John J Lee <jjl@pobox.com>]
223 FAQ: Q. Pyrex says my extension type object has no attribute 'rhubarb', but
226 A. Have you declared the type at the point where you're using it?
228 Eliminate lvalue casts! (Illegal in C++, also disallowed by some C compilers)
229 [Matthias Baas <baas@ira.uka.de>]
231 Make Python class construction work more like it does in Python.
233 Give the right module name to Python classes.
235 Command line switch for full pathnames in backtraces?
237 Use PyString_FromStringAndSize on string literals containing
240 Peephole optimisation? [Vladislav Bulatov <vrbulatov@list.ru>]
242 Avoid PyArg_ParseTuple call when a function takes no positional args.
244 Omit incref/decref of arguments that are not assigned to?
246 Can a faster way of instantiating extension types be found?
248 Disallow declaring a special method of an extension type with
249 'cdef' instead of 'def'.
251 Use PySequence_GetItem instead of PyObject_GetItem when index
254 If a __getitem__ method is declared with an int index, use the
255 sq_item slot instead of the mp_subscript slot.
257 Provide some way of controlling the argument list passed to
258 an extension type's base __new__ method?
259 [Alain Pointdexter <alainpoint@yahoo.fr>]
261 Rename __new__ in extension types to __alloc__.
263 Implement a true __new__ for extension types.
265 Way to provide constructors for extension types that are not
266 available to Python and can accept C types directly?
268 Support generators by turning them into extension types?
272 Variable declarations inside inner code blocks?
274 Initial values when declaring variables?
276 Do something about __stdcall.
278 Support class methods in extension types using METH_CLASS flag.
280 Disallow defaulting types to 'object' in C declarations?
282 C globals with static initialisers.
284 Find a way of providing C-only initialisers for extension types.
286 Metaclasses for extension types?
288 Make extension types use Py_TPFLAGS_HEAPTYPE so their __module__
289 will get set dynamically?