Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108866 > unrolled thread

Re: How do I subclass the @property setter method?

Started byChristopher Reimer <christopher_reimer@icloud.com>
First post2016-05-20 13:09 -0700
Last post2016-05-20 13:09 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How do I subclass the @property setter method? Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-20 13:09 -0700

#108866 — Re: How do I subclass the @property setter method?

FromChristopher Reimer <christopher_reimer@icloud.com>
Date2016-05-20 13:09 -0700
SubjectRe: How do I subclass the @property setter method?
Message-ID<mailman.56.1463774978.27390.python-list@python.org>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web