18
Python's pathlib module
(www.pythonmorsels.com)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
Scapy is another library where they redefined
/
to layer packets, such that you can write:Then Scapy has magic so that on serialisation, the UDP layer knows defaults to dport=53 if the upper layer is DNS, and it can access the lower layer to compute its checksum.
And don't forget that strings have a custom
%
(as in modulo) operator for formatting:Of course in modern Python, f-strings will almost always be more convenient