See Python 3.12: what didn't make the headlines. This is very helpful.
It is a great list of 7 key features of Python 3.12.
With one tiny point I need to object to.
This is a strongly-held position.
Debuggers are harmful.
I say this …
A "Dice Mechanic"? Yes. The thing you do with the dice to determine an outcome. We'll use Python to see how the dice shake out.
For a casino game of craps, the roll of the dice can be 7 or 11 for an immediate win, 2, 3 …
This is a great question.
https://fosstodon.org/@JustineSmithies/110979871574705636
This works, they said.
echo -en "Firefox\0icon\x1fweechat" | fuzzel -d -w 100 -l 10
But. The superficial switch to subprocess.Popen() doesn't work.
Why?
The way echo works varies from shell to shell. When MacOSX changes to zsh, things …
more ...Stuff I found on the internet that I have to disagree with.
(And no, I didn't ask for clarification. If the author posts things without supporting details it suggests they might lack the supporting details. I can be charitable and assume they don't really care about providing useful information, but …
more ...See https://writing.peercy.net/p/python-quirks
Superficially, most of these are true.
Looking a little more deeply, most of them are also presented in a somewhat misleading way. A few set up a good punch-line. The Inheritance one, for example, is funny.
If the point is to force a …
more ...I want to call out two huge problems with Python. I'm not the first to point these out, but they've been bothering me for a while.
I've provided them here to save folks from repeating these. They're now officially "known" and there's no point in repeating …
more ...See https://github.com/slott56/py-web-tool
And https://pypi.org/project/py-web-lp/
I finally made the PyWeb LP tool installable from PyPI.
I need to fix the name of the GitHub repo (some day) to make it also say py-web-lp. I should also fixup my tag cloud to say pyweblp …
more ...The typing module includes the mysterious-looking Annotated type hint. See https://docs.python.org/3/library/typing.html#typing.Annotated for details.
The Annotated type hint lets us append "details" to a …
Behave fixtures totally rock for testing complex applications.
I had been doing them wrong. Doing them right is simpler.
I'm a fan of the Gherkin language for specifying the behavior of software.
Scenario: Works for Me Given a configuration When a request is made Then the response can …