Commit 59056f62 authored by Stefan Behnel's avatar Stefan Behnel

avoid unnecessary overhead when setting Python class docstrings

parent 6758dc56
......@@ -6680,8 +6680,10 @@ class ClassNode(ExprNode, ModuleNameMixin):
if self.doc:
code.put_error_if_neg(self.pos,
'PyDict_SetItemString(%s, "__doc__", %s)' % (
'PyDict_SetItem(%s, %s, %s)' % (
self.dict.py_result(),
code.intern_identifier(
StringEncoding.EncodedString("__doc__")),
self.doc.py_result()))
py_mod_name = self.get_py_mod_name(code)
qualname = self.get_py_qualified_name(code)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment