When porting code to python 3, I came across a situation where the doxygen markup seems to tell python that we are trying to write a unicode literal, and importing the file fails with the error:
Traceback (most recent call last):
File "tests/testPsfIO.py", line 44, in <module>
import lsst.meas.algorithms as algorithms
File "/Users/nate/repos_lsst/meas_algorithms/python/lsst/meas/algorithms/__init__.py", line 29, in <module>
from .detection import *
File "/Users/nate/repos_lsst/meas_algorithms/python/lsst/meas/algorithms/detection.py", line 211
"""
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2129-2130: truncated \uXXXX escape
The docstring itself can be seen on: Github. Prefixing the docstring with r (telling python a raw string is desired) fixes the problem. I am wary of embedding the escape character in the docstring itself, as it may interfere with doxygen generation. Does anyone have thoughts or preferences?