From 08b1b9ccd05c37f2aff45e55d40d2e18396b7dfb Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 15 Jul 2024 11:00:55 +0200 Subject: [PATCH] docs: add more terms that ppl might know --- docs/init.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/init.md b/docs/init.md index 4e3141f3..68d2628b 100644 --- a/docs/init.md +++ b/docs/init.md @@ -31,7 +31,13 @@ class Point: pt = Point.from_row(row) ``` -Now you can instantiate `Point`s without creating fake row objects in your tests and you can have as many smart creation helpers as you want, in case more data sources appear. +This is sometimes called a *named constructor* or a *factory method*. + +Now, you can instantiate `Point`s without creating fake row objects in your tests. +You can also have as many smart creation helpers as you want. +This flexibility is useful because additional data sources tend to appear over time. + +--- For similar reasons, we strongly discourage from patterns like: