u/JuneStar02

▲ 3 r/RenPy

Object Oriented Programming Scope Declaration Question

Should I declare class instances outside of init python: or label: blocks at the highest scope? Everywhere I look this up I get conflicting information on what I should do.

For more specifics when I declare a class instance at the highest scope on file I keep all my variables on in the game folder as:

default newClass = class()

I am unable to reference newClass outside of the highest scope. Any changes done to it at the module level seem to be forgotten when referenced in a label: or screen: block.

But when I declare the class instance within a label: block I can reference it anywhere. And it appears to save and not break on rollback. But if this will be trouble in the future I'd rather fix it now and not way down the line.

Is that the correct way to be doing it or should they be declared at the highest scope? Should I not have a separate file for all of my variables, classes, etc.?

reddit.com
u/JuneStar02 — 2 days ago

Trying to catch up is so overwhelming

It's so hard to not feel like a failure at every step in life. I'm only trying to achieve the bare minimum that people my age have and there's so many bad habits, bad coping mechanisms, and bad practices that I have to unlearn. Whether it's my health, career, interpersonal relationships, or just my own mindset.

I try to eat better, I try to exercise more, I'm studying, I'm applying to jobs, I'm reaching out to people more, I'm trying to not act like a bitter depressed asshole, I'm trying to be more mindful of how I treat myself, I'm trying to be more proactive about problems instead of avoiding them, I'm trying to take better care of my hygiene, I'm trying to be kinder to myself. And even when I start building up a good habit, it's a fight to keep it going because I easily slip back into the bad habits. I haven't tried to get my finances in order because it's not like I can pay for student loans with no job. My credit is all sorts of fucked up and everything is going to be way more expensive for a long time.

I know the correct answer for me isn't to give up but it all just feels so insurmountable to put in this huge amount of effort everyday. And somehow it simultaneously feels like I'm not doing enough/progressing fast enough.

I can only repeat, "be kinder to yourself" so many times when constantly fucking up basic shit that would've been cute ten years ago, but now that I'm in my mid 30s is just sad (Like recently, I've only just realized my resume is complete ass after applying with it for 6 months. And I've only realized this because I printed it out to go to a job fair). How does everyone do this shit? Nothing to do but cry about it and keep trying.

reddit.com
u/JuneStar02 — 12 days ago