/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

chris-lamb.co.uk
| | blog.nuculabs.de
5.5 parsecs away

Travel
| | Hello, In this short article I would like to talk about context managers. I personally consider that at the core they are just a form of decorators. If you don't know what a decorator is check the Decorator Pattern Wikipedia article. Decorators can be used to implement cross-cutting concerns. We have componentA and we need logging and security, we could write the logic for logging and security handling in componentA but some people consider component a should be componentA not componentAthatAlsoKnowsAboutSecurityAndOtherStuff. Since it's not the component's responsibility to authorize requests or log calls to a external logging service, we can wrap the componentA into a decorator that does just that.
| | bluebones.net
4.5 parsecs away

Travel
| | [AI summary] A programming tutorial explains how to create a Python decorator that preserves function return types while conditionally altering the output.
| | jimpurbrick.com
6.4 parsecs away

Travel
| | [AI summary] The article discusses the use of Python decorators for handling web requests, their interaction with introspection, and methods to preserve function metadata while maintaining decorator visibility.
| | fzakaria.com
24.0 parsecs away

Travel
| Bazel has always had support for protocol buffers (protobuf) since the beginning. Both being a Google product, one would think that their integration would be seamless and the best experience. Unfortunately, it's some of the worst part of the user experience with Bazel I've found.