-
-
Notifications
You must be signed in to change notification settings - Fork 684
Closed
Milestone
Description
In order to clean up the wrapping of C++ code, we need proper conversion of C++ objects to and from Python strings. This is currently done in a hacky way in ccobject.h but it can be done more cleanly using Cython's support for C++ templates.
In particular, we implement:
ccrepr()to convert any C++ object tostrccreadstr()to convert astrto a C++ object
We intentionally use the words repr and read because this is using string input/output (operators << and >>).
Moreover, this new function will support both Python 2 and Python 3. In the latter case, the filesystem encoding is used.
CC: @embray
Component: python3
Author: Jeroen Demeyer
Branch/Commit: b7127ce
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/23857