Fausto Blog Fausto Blog
  • Home
  • About
By Aldo Richard Santillán Echevarría in Python — Apr 11, 2024

Conda cheat sheet

Conda cheat sheet
Previous

ReactJS Components: Class-Based vs Functional

Next

Google Cloud Fundamentals: Core Infraestructure - Resource and access in the cloud -> Resource hierarchy

You might also like...

Subscriptable Classes Without a Metaclass: Python's __class_getitem__
Python

Subscriptable Classes Without a Metaclass: Python's __class_getitem__

This article explains how Python's __class_getitem__ makes a class subscriptable, why it should return a GenericAlias, how a metaclass takes precedence over it, how it relates to the generic syntax of Python 3.12, and what it does not check at run time.
Read More
Aldo Richard Santillán Echevarría
How Can a Program Run Its Own Small Language? The Interpreter Pattern in Python
Python

How Can a Program Run Its Own Small Language? The Interpreter Pattern in Python

This article explains how the Interpreter pattern represents grammar rules as classes, how a recursive-descent parser builds the expression tree, how Python's ast module offers a safe alternative to eval, and which pitfalls and costs the pattern carries.
Read More
Aldo Richard Santillán Echevarría
Custom Format Codes in f-Strings: Python's __format__ Method
Python

Custom Format Codes in f-Strings: Python's __format__ Method

This article explains how format, str.format and f-strings delegate to the __format__ method, how a class can define format codes of its own and delegate numeric parts to the mini-language, and which pitfalls a careless implementation hides.
Read More
Aldo Richard Santillán Echevarría
Counting Without Boilerplate? Python's collections.Counter
Python

Counting Without Boilerplate? Python's collections.Counter

This article explains how Python's collections.Counter counts hashable elements, ranks them with most_common, combines counts as multisets, measures its speed against manual loops, and describes its pitfalls.
Read More
Aldo Richard Santillán Echevarría
Fausto Blog © 2026
  • Sign up
Powered by Ghost