Prashant Sengar

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.