Patterns

Patterns

6 bookmarks
Custom sorting
Please don't hijack my Python root logger
Please don't hijack my Python root logger
With the recent explosion of LLM tools, I often like to kill time fiddling with different LLM client libraries and SDKs in one-off scripts. Lately, I’ve noticed that some newer tools frequently mess up the logger settings, meddling with my application logs. While it’s less common in more seasoned libraries, I guess it’s worth rehashing why hijacking the root logger isn’t a good idea when writing libraries or other forms of reusable code.
·rednafi.com·
Please don't hijack my Python root logger
A Guide to Python's Weak References Using weakref Module
A Guide to Python's Weak References Using weakref Module
p Chances are that you never touched and maybe haven't even heard about Python's code class="inline"weakref/code module. While it might not be common...
·martinheinz.dev·
A Guide to Python's Weak References Using weakref Module
3 Tips For Writing Pythonic Code
3 Tips For Writing Pythonic Code
Learn what it means for code to be Pythonic and explore three ways you can write clear, Pythonic code right now.
·davidamos.dev·
3 Tips For Writing Pythonic Code
State Pattern in Python
State Pattern in Python
Learn to implement state pattern and finite state machines using Python.
·auth0.com·
State Pattern in Python
How to Write Cleaner Python Code Using Abstract Classes
How to Write Cleaner Python Code Using Abstract Classes
What are Abstract Classes? When are they useful? When should you use them? Let's take a look!
It turns out that the Abstract class is what we need. Essentially it forces its subclasses to implement all of its abstract methods. It is a class that represents what its subclasses look like.
·blog.teclado.com·
How to Write Cleaner Python Code Using Abstract Classes