python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
abstract staticmethod throws TypeError when used by subclass instances
An ABC superclass defines several abstract methods and an abstract static method for which all 3 methods need to be implemented in the subclasses:
class Tool(abc.ABC):
@abc.abstractmethod
def...
pstatix
Votes: 0
Answers: 0
How install new module in a Python library?
I have a Python library which works in a specific field, created to simulate several astronomical behaviours. This library it was made by my teacher, and now I've made another module with a new class ...
Gabriele Troviso
Votes: 0
Answers: 0
Python class inheritance with different parameters
Please see the code below. Part of the explanation is:
B's constructor calls its direct superclass's constructor via line super().__init__(y) (super() returns a reference to the direct superclass)....

Raf T.
Votes: 0
Answers: 2
Appending to a class instance attribute in python
I have a list of class instances, and I want to append separate items to an attribute for each. However, I ended up appending each item to the attribute on every instance in the list. Example code bel...
name
Votes: 0
Answers: 1