You can freely leave Pycharm out of equation.
In that case, there is a question how to force subclass to implement setter
method?
--
https://mail.python.org/mailman/listinfo/python-list
On 24/06/2020 22:46, zljubi...@gmail.com wrote:
Why Pycharm didn't offer a setter as well as getter?
This is a general Python mailing list. If you have specific
questions/complaints about PyCharm, they are probably better addressed
directly to the makers of PyCharm.
--
Rhodri James *-* Kyn
This also works with no errors:
from abc import ABC, abstractmethod
class C(ABC):
@property
@abstractmethod
def my_abstract_property(self):
pass
@my_abstract_property.setter
@abstractmethod
def my_abstract_property(self, val):
pass
class D(C):
my
If my subclass is as this:
from subclassing.abstract.BaseSomeAbstract import BaseSomeAbstract
class ChildSomeAbstract(BaseSomeAbstract):
@property
def abs_prop(self):
return self._abs_prop
I can create an instance of it with no errors. So
x = ChildSomeAbstract()
works with no p
I would like to have an abstract class in which I will have an abstract
property. So I used Pycharm in order to create an abstract (base) class:
import abc
class BaseSomeAbstract(abc.ABC):
_abs_prop = None
@property
@abc.abstractmethod
def abs_prop(self):
return self._a