TIL: Enforcing keyword-only arguments in Python function

You can enforce keyword-only arguments in your functions by adding “*” before the arguments. Example: def create_node(self, *, node_id, name): … When calling the above defined method, you will call it like: self.create_node(node_id=1, name=”node”) If you call self.create_node(1, “node”), it will raise a TypeError. I like that it makes my code look clean and makes …

TIL: Enforcing keyword-only arguments in Python function Read More »

My Journey to Mindful Smartphone Usage

Discover how I broke free from smartphone distractions and embraced mindful usage. Join me on a journey of self-reflection and practical strategies for a more intentional digital life.

prashant sengar and alexandra from scihub

Looking Back – 2020-2021

Reminiscing about all the great things that happened to me the last year from 10th September 2020 to 9th September 2021.

resting well toolkit by prashant sengar

Toolkit on resting well

After grokking on your projects for 6 months, what do you think is the best thing to work even better for the next 2 quarters of the year? You are right, resting well.   Resting properly is not just a one-off thing you do once or twice a year. You should rest your mind and …

Toolkit on resting well Read More »