Issue1532

classification
Title: Cannot use docstring when defining class
Type: behaviour Severity: normal
Components: Core Versions: 2.5.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: iamedu, pjenvey
Priority: Keywords:

Created on 2010-01-04.22:06:17 by iamedu, last changed 2010-01-09.06:39:17 by pjenvey.

Messages
msg5405 (view) Author: Eduardo Diaz (iamedu) Date: 2010-01-04.22:06:17
This code:

class Test(object):
    "Docstring"
    test = "Test\n" + __doc__

print Test.test

Does the following with Cpython:

Test
Docstring

But with jython you get:

Traceback (most recent call last):
  File "data.py", line 1, in <module>
    class Test(object):
  File "data.py", line 3, in Test
    test = "Test\n" + __doc__
TypeError: cannot concatenate 'str' and 'NoneType' object
msg5420 (view) Author: Philip Jenvey (pjenvey) Date: 2010-01-09.06:39:16
fixed in r6959, thanks!
History
Date User Action Args
2010-01-09 06:39:17pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg5420
2010-01-05 00:31:31pjenveysetassignee: pjenvey
nosy: + pjenvey
2010-01-04 22:06:34iamedusetversions: + 2.5.1
2010-01-04 22:06:18iameducreate