Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: how to inherit docstrings? Date: Fri, 10 Jun 2011 19:22:36 +1200 Lines: 16 Message-ID: <95dv1vFmgrU1@mid.individual.net> References: <943d6cc1-5e1e-4f39-8003-6d70cbbed3a5@glegroupsg2000goo.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net TE/aBe8FxJDLep/0/QFsFAmVBEqAk6NJDZj5fESkAWpQrrr2JE Cancel-Lock: sha1:CqkJ5O/9nR9vEvZrd4KIX2Cc/C8= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <943d6cc1-5e1e-4f39-8003-6d70cbbed3a5@glegroupsg2000goo.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7361 Carl Banks wrote: > x = random.choice([Triange(),Square()]) > print x.draw.__doc__ # prints "Draws a shape" > > Quick, what shape is x.draw() going to draw? Your debugging code is insufficient. It should include print type(x) and then it will be obvious what shape is going to get drawn. -- Greg