Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Christopher Reimer Newsgroups: comp.lang.python Subject: Re: How do I subclass the @property setter method? Date: Fri, 20 May 2016 13:09:36 -0700 Lines: 27 Message-ID: References: <2200dfd0-7470-0c86-c015-a6a14a2f51f2@icloud.com> <4fb93ec4-e988-cf36-1d53-9948cce0f176@icloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de tVUYfWNojyxGjJg/szOfvQ6KB3dVKSBAqX1lx9nRohfA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'test,': 0.05; 'report.': 0.07; 'subject:How': 0.09; '@property': 0.09; 'subject:method': 0.09; 'bug': 0.10; 'def': 0.13; 'happy.': 0.16; 'hint': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'redundant.': 0.16; 'subclassing': 0.16; 'wrote:': 0.16; 'fixed.': 0.18; 'work,': 0.21; 'correctly.': 0.22; 'mind.': 0.22; 'pass': 0.22; 'am,': 0.23; 'seems': 0.23; 'feature': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'bugs': 0.27; 'separate': 0.27; 'received:17': 0.27; "i'm": 0.30; 'code': 0.30; 'initially': 0.30; 'post': 0.31; 'received:10.0.0': 0.32; 'reported': 0.32; 'similar': 0.33; 'received:10.0': 0.34; 'unit': 0.35; 'should': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thank': 0.38; 'sure': 0.39; 'does': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'header:MIME- version:1': 0.60; 'ever': 0.60; 'ago.': 0.61; 'charset:windows-1252': 0.62; 'url:issue': 0.66; 'header:In-reply- to:1': 0.84 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-05-20_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1605200247 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 In-reply-to: <2200dfd0-7470-0c86-c015-a6a14a2f51f2@icloud.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=4d515a; t=1463774975; bh=6+h5qGGEaeMk7xeJEQM9lvoersPnjpIeNaZg8o6DdkE=; h=Subject:To:From:Message-id:Date:MIME-version:Content-type; b=QZfG4zktXHNpbeQ2ovHrPnFifmnVt5yNQH+GPSm+VfGaAZ13MA1asL5ekDYNzTG25 PAeNhnqnQ8uZhMrazbqS0itaScUSkh7m1fJ+R95VM+3jv8kg/cl+0OqbM8f9fYXUZT hSR6zaMRg7xLIB5pR3Fj89Cg/HnC3k4zMycg1uxVN1PKKYBvEfB5gq4Ykw/PWPvZ1K y2kKmJ2GC20tzbnhMxE9eSMjcewACtdy7y5Be0t3RsNzmOhkEWLWZWc5E1NWC3wrZZ X4FMemE7b+4SI7jhtr6+j7L3dMJVcxwqszOVo8h+g+KY/CiiOQi/lAFospgTRRFoPX AHiWfOoFIl3zA== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <4fb93ec4-e988-cf36-1d53-9948cce0f176@icloud.com> X-Mailman-Original-References: <2200dfd0-7470-0c86-c015-a6a14a2f51f2@icloud.com> Xref: csiph.com comp.lang.python:108866 On 5/20/2016 11:50 AM, Christopher Reimer wrote: > This code does work, blows up the unit test, and keeps PyCharm happy. > > @property > def position(self): > return super().position > > @position.setter > def position(self, position): > pass > > Re-declaring @property and calling super seems redundant. Not sure if > I found a bug with the PyCharm hint feature or I'm not subclassing the > @property setter correctly. Which is it? Never mind. This is a known bug for PyCharm IDE. https://youtrack.jetbrains.com/issue/PY-12803 I sent a separate email to technical support to inquire if this bug and similar bugs will ever get fixed. This issue was initially reported three years ago. Not sure if I should post my own bug report. Thank you, Chris R.