What is a stub file? It is a file with the .pyi extension, which describes the Python type information, both input and return for functions and omits the logical part. Using a stub file has the following advantages (see PEP 484). Example def stringify(what): return str(what) Example sample.pyi from typing import Union def stringify(what: Union[int, list, dict]) -> str: ... Advantages Type information can be added by adding a separate stub file to a third-party library that does not have type annotations.
A new data type Before talking about the Either data type, we need to know what a data type is. A data type is an abstraction that encapsulates one reusable coding pattern. In our case, the Either data type encapsulates two other objects: Left and Right. These two objects represent Error and Success respectively. This is a common pattern for Functional Programming. Left and Right Left and Right, are classes wich represent the error and success data.
Fun terminal tools There are very useful command line tools, which are used for daily administration, whatever the job you have to do, an example are find, grep, cat, less, etc. There are also more complex tools that require the study and consultation of manuals such as docker, vagrant, etc. and are for advanced users such as systems engineers and developers. Other tools are used … well, practically nothing, except to elicit a laugh.
In this section you will find the tools, utilities and editors or IDE that I use daily for my work, my hobbies and my open source projects, which you can find on my Github page. Fedora: Welcome to Freedom Fedora is a Linux kernel based operating system. It offers three editions: Fedora Workstation, for all desktops and laptops Fedora Server, for any server Fedora IoT, for all ARM devices It is also available in different variations, called spin.