hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
309 stars 60 forks source link

Python 3 does not have string.uppercase #157

Closed lexnederbragt closed 6 years ago

lexnederbragt commented 6 years ago

I am trying to compile the book from https://github.com/hplgit/setup4book-doconce. I used 2to3 to convert scripts.py to Python 3. But now I run into an issue with doconce's latex.py:

 File "/anaconda3/envs/doconce_1_4_5_nbformat_4_3/lib/python3.6/site-packages/doconce/latex.py", line 2617, in latex_quiz
    text += '\\textbf{%s}. ' % string.uppercase[i]

Comparing https://docs.python.org/2.7/library/string.html with https://docs.python.org/3.6/library/string.html it seems string.uppercase is removed, probably in favor of string.ascii_uppercase.

Not sure whether this needs fixing...

dumblob commented 6 years ago

Wouldn't https://docs.python.org/3.6/library/stdtypes.html#str.upper be more fitting the purpose?

KGHustad commented 6 years ago

Not really, no. We only use it to map the numbers [0-25] to their respective letter [A-Z] in the alphabet.