This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author filip.zyzniewski
Recipients BreamoreBoy, brian.curtin, daaku, filip.zyzniewski, georg.brandl, ncoghlan, steven.daprano, terry.reedy
Date 2013-12-11.13:25:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386768349.32.0.164713986829.issue4037@psf.upfronthosting.co.za>
In-reply-to
Content
It seems like there is also an issue with property classes defined in a different module.

In the example below Foo.x uses standard property, and Foo.y uses prop imported from the prop module.

This results in docstring for Foo.y to be missed:

filip@klocek:~/test$ cat prop.py
class prop(property):
    pass
filip@klocek:~/test$ cat foo.py
from prop import prop

class Foo(object):

    @property
    def x(self):
        """
        >>> Foo().x
        'x'
        """
        return 'x'

    @prop
    def y(self):
        """
        >>> Foo().y
        'y'
        """
        return 'y'
filip@klocek:~/test$ python --version
Python 2.7.3
filip@klocek:~/test$ python -m doctest foo.py -v
Trying:
    Foo().x
Expecting:
    'x'
ok
2 items had no tests:
    foo
    foo.Foo
1 items passed all tests:
   1 tests in foo.Foo.x
1 tests in 3 items.
1 passed and 0 failed.
Test passed.
filip@klocek:~/test$ python3 --version
Python 3.2.3
filip@klocek:~/test$ python3 -m doctest foo.py -v
Trying:
    Foo().x
Expecting:
    'x'
ok
2 items had no tests:
    foo
    foo.Foo
1 items passed all tests:
   1 tests in foo.Foo.x
1 tests in 3 items.
1 passed and 0 failed.
Test passed.
filip@klocek:~/test$
History
Date User Action Args
2013-12-11 13:25:49filip.zyzniewskisetrecipients: + filip.zyzniewski, georg.brandl, terry.reedy, ncoghlan, daaku, steven.daprano, brian.curtin, BreamoreBoy
2013-12-11 13:25:49filip.zyzniewskisetmessageid: <1386768349.32.0.164713986829.issue4037@psf.upfronthosting.co.za>
2013-12-11 13:25:49filip.zyzniewskilinkissue4037 messages
2013-12-11 13:25:49filip.zyzniewskicreate