/explore
|
You are here |
blog.meadsteve.dev | ||
| | | | |
borutzki.github.io
Sometimes a function takes multiple arguments of different types, and the return type depends on specific combinations of inputs. It's often easy to understand by reading code, but how do you tell the type checker that this is the case? This is where the @overload decorator from the typing module comes handy. |
|
| | | | | ||
| | | | |
switowski.com
Continue the magic functions journey and create a cell magic function that checks type hints in IPython. |
|
| | | | | ||
| | | | |
adamj.eu
In a type hint, if we specify a type (class), then we mark the variable as containing an instance of that type. To specify that a variable instead contains a type, we need to use type[Cls] (or the old syntax typing.Type). |
|
| | | | | ||
| | | | |
ykarroum.com
[AI summary] This technical article demonstrates how to create a Python decorator that automatically detects and sets the inplace=True parameter for pandas and numpy functions to optimize memory usage, while carefully handling reference counting and syntax tree analysis to prevent unintended side effects. |
|
| | | |||