All Questions
Tagged with python-attrs super
3
questions
1
vote
2
answers
482
views
Passing parameters to frozen super dataclass
I have a simple (frozen) dataclass inheritance as follows:
from attrs import frozen
@frozen
class Interval:
left: str
right: str
@frozen
class RealInterval(Interval):
def ...
1
vote
1
answer
1k
views
attrs library and super
Here is a toy example of class that I want to refactor. In reality I've much more parameters/attributes like momentum, so a lot of code repetition:
class TransformBl(tf.keras.Model):
def __init__(...
4
votes
1
answer
475
views
What is the difference between super() and explicit super(Cl,self) (with __slots__ and attrs)
I'm using the attrs python package, in combination with inheritance and slots. I want to call the parent class's method from within the derived method. The problem is demonstrated below:
import attr
...