@yngvem I added colour to doctest output in Python 3.13 :)
https://docs.python.org/3.13/whatsnew/3.13.html#doctest
Try out the release candidate here: https://www.python.org/download/pre-releases/
@yngvem I added colour to doctest output in Python 3.13 :)
https://docs.python.org/3.13/whatsnew/3.13.html#doctest
Try out the release candidate here: https://www.python.org/download/pre-releases/
Mia Bajić: The Standard Library Tour @ PyCon Ireland 2023
The Standard Library Tour is designed to provide attendees with an understanding of Python's standard library less known features. Have you ever found yourself writing complex code only to discover that Python has tools available within its library that could have made your job easier? Then this talk is for you!
Published my fork of a #doctest library for #CommonLisp: https://github.com/simendsjo/sijo-doctest
Original library: https://github.com/johanlindberg/doctest
When teaching #rust, I often see people have a "Wow 🤯!" experience when I show #rustdoc #doctest system: you write small pieces of Rust code in your documentation and they are then executed as part of your test suite.
What people often don't know is that this system is ancient! I first met in #python and there it was introduced in 1999: https://groups.google.com/g/comp.lang.python/c/DfzH5Nrt05E/m/Yyd3s7fPVxwJ. That's 24 years ago!
I don't know if this was the first implementation of this concept?
I created a small #Python #Markdown extension that parses `pycon` syntax code blocks *without indentation and without fences*, and renders them using #pymdownx's Highlight extension 🙂
It will be useful in Python docstrings, to add examples anywhere just how #doctest expects them!
It's immediately available to my sponsors and has been added to the GraviFridge goal (https://pawamoy.github.io/insiders/#1000-gravifridge-user-manual) 😊
🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
🧩 All solutions use only the #PythonStandardLibrary with no need for external packages
🔬 #Tests are included in function #docstrings and can be run using the #doctest module
⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning
🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
Pure Python solutions for the Advent of Code puzzles written by Paolo Melchiorre. - GitHub - pauloxnet/adventofcode: Pure Python solutions for the Advent of Code puzzles written by Paolo Melchiorre.