/explore
|
You are here |
alexwlchan.net | ||
| | | | |
aivarsk.com
I have a piece of C++ code that calls user-defined functions implemented in Python. Instead of requiring all functions to have the same signature with 6 arguments, the C++ code inspects the function signature and passes only the arguments function accepts - 1, 3, or all 6 of them. I use the inspect module and getargspec function for that but it feels a bit wrong and bloated. So let's see how we can get the work done without the inspect module. |
|
| | | | | ||
| | | | |
til.simonwillison.net
I figured out how to run a subprocess with a time limit for datasette-ripgrep , using the asyncio.create_subprocess_exec() method. The pattern looks like this: |
|
| | | | | ||
| | | | |
fuzzyblog.io
[AI summary] The author discusses differences between Python and Ruby regarding dictionary key access and missing keys, highlighting cultural design philosophies and the Pythonic .get() method. |
|
| | | | | ||
| | | | |
patrick.wtf
A couple of months ago, I merged a pull request to improve Strawberry's error messages and make them more user-friendly. In this article I'll show the steps I took to improve the user experience of the Strawberry error messages and, hopefully, inspire you to do the same on your projects! |
|
| | | |||