It is funny that when one decides to refresh the basics of Python, watches the first video about types and is already stuck for an hour testing edge cases and wondering why?
Let’s explore the bool function with empty containers.
A week ago I passed Google ACE exam, here I post a personal summary and some tips on how to pass it.
Let’s connect MySQL database installed in Ubuntu (WSL2) with Pycharm Professional on Windows.
Recently I have started to dive into game programming a bit more. Coming from Python with Pyglet,
my current choice is Godot game engine. I created a simple text-based game menu in both to see what is easier for someone without any prior experience.
Premature optimization - the root of all evil. Or something like:
we think that in the future we will need this and that feature, though
in reality, in most cases, we do not.
Sometimes when you come to the project, you see EAV database design, and some developers hate it,
some do not have an opinion, and the rest do not care. Majority of database
designers and developers would tell you that you should use a typical relational model, with all its tooling available out of the box, instead of handcrafting everything on your own. I agree on that, but
is there a case when EAV is good?
Recently I dived into design patterns a little bit, to refresh a rusty knowledge.
It is something we are using in Python daily, however not often realizing that.
And I like reading those religious debates between programmers. One of them is the usage
of Singleton in Python. Let’s see what is Pythonistas take on this beloved pattern.
The first paragraph from Python documentation about concurrency titled “Concurrent Execution” mentions a few phrases like,
CPU bound, IO bound, event-driven cooperative multitasking or preemptive multitasking.
In this intro post to concurrency, let’s clarify these definitions.
In pytest we can parametrize in three different ways:
- pytest.fixture() - allows to parametrize fixture functions
- @pytest.mark.parametrize - allows to define arguments for a test function or class
- pytest_generate_tests - allows to define custom parametrization schemes
This article presents a few examples of how to use parametrization in pytest
using @pytest.mark.parametrize.
The article starts from the basic tests, and end with the usage of ids and indirect.
The famous PEP 572, and one of the reasons Guido Van Rossum - Python BDFL - retired from decision process (stepped down as BDFL).
It is called “Assignment Expressions”, and is about adding new syntax := that will allow assign to variables
within an expression.
In Python, we have positional and keywords arguments. With the introduction of new syntax in PEP 570,
we can specify positional-only parameters in Python function definitions.
This feature is especially useful for library developers, to ensure
correct usage of an API. Let’s discuss what this PEP is all about.