Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unicode in doc strings

Hi!

Is it possible to use utf-8 characters in doc-strings? I tried to write description to __init__ method in russian language:

class Bazz:
    def __init__(self):
        """
        ? ? ? ? ?
        """
        pass

but then I write "Bazz(" and press tab:

Traceback (most recent call last): File "", line 1, in File "_sage_input_66.py", line 10, in exec compile(u'print _support_.docstring("Bazz", globals(), system="sage")' + '\n', '', 'single') File "", line 1, in File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 263, in docstring return html_markup(s) File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 288, in html_markup return '

' + preamble + '

' + s + '

' UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 11: ordinal not in range(128)

unicode in doc strings

Hi!

Is it possible to use utf-8 characters in doc-strings? I tried to write description to __init__ method in russian language:

class Bazz:
    def __init__(self):
        """
        ? ? ? ? ?
? 
        """
        pass

but then I write "Bazz(" and press tab:

Traceback (most recent call last): File "", line 1, in File "_sage_input_66.py", line 10, in exec compile(u'print _support_.docstring("Bazz", globals(), system="sage")' + '\n', '', 'single') File "", line 1, in File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 263, in docstring return html_markup(s) File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 288, in html_markup return '

' + preamble + '

' + s + '

' UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 11: ordinal not in range(128)

unicode in doc strings

Hi!

Is it possible to use utf-8 characters in doc-strings? I tried to write description to __init__ method in russian language:

class Bazz:
    def __init__(self):
        """
        ? ? ? ? ? 
        """
        pass

but then I write "Bazz(" and press tab:

Traceback (most recent call last): File "", line 1, in File "_sage_input_66.py", line 10, in exec compile(u'print _support_.docstring("Bazz", globals(), system="sage")' + '\n', '', 'single') File "", line 1, in File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 263, in docstring return html_markup(s) File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 288, in html_markup return '

' + preamble + '

' + s + '

' UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 11: ordinal not in range(128)

P.S. After I posted this question, site relapsed russian characters in code with '?' :-\