[Python-bugs-list] [ python-Bugs-576990 ] inheriting from property and docstrings
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 03 Jul 2002 07:42:03 -0700
Bugs item #576990, was opened at 2002-07-03 14:42
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=576990&group_id=5470
Category: Python Interpreter Core
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Roeland Rengelink (rengelink)
Assigned to: Nobody/Anonymous (nobody)
Summary: inheriting from property and docstrings
Initial Comment:
If I inherit from property, and try to initialize a derived
property object, the doc string doesn't get set. This bug
was introduced in 2.2.1, and is present in 2.3a0:
Compare:
Python 2.2 (#1, Mar 26 2002, 15:46:04)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> class myprop(property):pass
...
>>> a = myprop(None, None, None, 'hi')
>>> print a.__doc__
hi
and,
Python 2.2.1 (#1, Jun 16 2002, 16:19:48)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> class myprop(property):pass
...
>>> a = myprop(None, None, None, 'hi')
>>> print a.__doc__
None
There is no problem with the getter/setter functions
passed to the constructor. i.e.: myprop(f,g,h,None) works
identical in 2.2 and 2.2.1
Good luck,
Roeland Rengelink
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=576990&group_id=5470