You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for PEP 484 compatible typing. Both signature annotations (PEP 484) and variable annotations (PEP 526) are now parsed for Python types and cython.* types like list or cython.int.
Interesting changes in 0.26:
Faster GIL re-entry with the directive fast_gil=True. It tries to remember the current GIL lock state in the fast thread local storage and avoids costly calls into the thread and GIL handling APIs if possible, even when calling across multiple Cython modules.
Interesting changes in 0.25:
Dynamic Python attributes are allowed on cdef classes if an attribute cdef dict dict is declared in the class.
Cython implemented C++ classes can make direct calls to base class methods.
C++ classes can now have typedef members.
for-loop iteration over "std::string".
Interesting changes <= 0.24.1:
C++ classes can now be declared with default template parameters.
Const iterators were added to the provided C++ STL declarations.
External C++ classes that overload the assignment operator can be used.
Support operator bool() for C++ classes so they can be used in if statements.
Cpdef enums are now first-class iterable, callable types in Python.
Enums can now be declared as cpdef to export their values to the module's Python namespace. Cpdef enums in pxd files export their values to their own module, iff it exists.
C++ class static methods can now be imported using @staticmethod. Allow @staticmethod decorator to declare static cdef methods. This is especially useful for declaring "constructors" for cdef classes that can take non-Python arguments.
C functions can coerce to Python functions, which allows passing them around as callable objects.
Extern C functions can now be declared as cpdef to export them to the module's Python namespace. Extern C functions in pxd files export their values to their own module, iff it exists.
Support for calling C++ template functions. We already use some C++ template functions, but now it can be done in a more convenient way, the same way importing of C++ template classes work.
Using cdef basestring stringvar and function arguments typed as basestring is now meaningful and allows assigning exactly str and unicode objects, but no subtypes of these types
Added a build_dir option to cythonize() which allows one to place the generated .c files outside the source tree.
External C++ classes can be declared nogil.
C++ STL container classes automatically coerce from and to the equivalent Python container types on typed assignments and casts. Note that the data in the containers is copied during this conversion.
C++ iterators can now be iterated over using "for x in cpp_container" whenever cpp_container has begin() and end() methods returning objects satisfying the iterator pattern (that is, it can be incremented, dereferenced, and compared (for non-equality)).
cdef classes can now have C++ class members (provided a zero-argument constructor exists)
The text was updated successfully, but these errors were encountered:
cztomczak
changed the title
Use new features from latest Cython
Use new features from the latest Cython
Sep 26, 2016
cztomczak
changed the title
Use new features from the latest Cython
Use new features from latest Cython
Sep 26, 2016
See Cython's changelog:
https://github.com/cython/cython/blob/master/CHANGES.rst
Interesting changes in 0.28:
Interesting changes in 0.27:
Interesting changes in 0.26:
Interesting changes in 0.25:
Interesting changes <= 0.24.1:
The text was updated successfully, but these errors were encountered: