-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inheritance... #1406
Comments
I'd have to see if this is intentional or just a weird oversight. I don't
think it's a bug, just an odd choice.
Init is something that should be standardized across AgentTypes. That's
part of what I'm working on.
…On Sat, Apr 6, 2024, 6:54 PM Alan Lujan ***@***.***> wrote:
https://github.com/econ-ark/HARK/blob/3ee397993a1db76bbc9ae24d3196dc31ccfe4874/HARK/ConsumptionSaving/ConsIndShockModel.py#L3347
KinkedR inherits from IndShockConsumerType
https://github.com/econ-ark/HARK/blob/3ee397993a1db76bbc9ae24d3196dc31ccfe4874/HARK/ConsumptionSaving/ConsIndShockModel.py#L3369
But init's from PerfForesightConsumerType
is this a bug? does it make a difference?
—
Reply to this email directly, view it on GitHub
<#1406>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFPVBYFXJF35CI4B37TY4B4JRAVCNFSM6AAAAABF2Y5G7WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDSNBVGE3DKMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I guess my question is why type the class name at all instead of |
Oh, it might have been an oversight when programming it. Or there's some
subtle reason to call PF's init rather than ConsIndShock-- I'm not sure.
But either way, this is part of the "spaghetti inheritance" problem that
we're unwinding.
…On Sat, Apr 6, 2024, 7:06 PM Alan Lujan ***@***.***> wrote:
I guess my question is why type the class name at all instead of
super().__init__(**params) or for other methods across the codebase
typing parent_class_name.method(self) instead of super().method(). It's
not like we're doing a lot of double inheritance, and it would prevent
these errors from happening since it always knows the right parent.
—
Reply to this email directly, view it on GitHub
<#1406 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADKRAFPAO4WIUEAUFH3K4PTY4B5V3AVCNFSM6AAAAABF2Y5G7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGIZDOMRSGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
please see PR #1407 replaced references to parent class with super there is one check failing which is concerning me, because I don't think I changed anything substantive, which makes me think there might have been a bug due to the |
HARK/HARK/ConsumptionSaving/ConsIndShockModel.py
Line 3347 in 3ee3979
KinkedR
inherits fromIndShockConsumerType
HARK/HARK/ConsumptionSaving/ConsIndShockModel.py
Line 3369 in 3ee3979
But
init
's fromPerfForesightConsumerType
is this a bug? does it make a difference?
The text was updated successfully, but these errors were encountered: