From 003f4b020194172befe266ff996d595775603b8d Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 27 Jun 2020 13:39:06 +0200 Subject: [PATCH] doc [skip ci] --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a47ffd8f..499fe2d4 100644 --- a/README.md +++ b/README.md @@ -575,9 +575,12 @@ Babashka sets the following system properties: ## `__name__ = "__main__"` pattern In Python scripts there is a well-known pattern to check if the current file was -the file invoked from the command line: `__name__ = "__main__" pattern`. In -babashka this pattern can be implemented using `(= *file* (System/getProperty -"babashka.file")`. +the file invoked from the command line, or loaded from another file: the +`__name__ = "__main__"` pattern. In babashka this pattern can be implemented with: + +``` clojure +(= *file* (System/getProperty "babashka.file") +``` ## Data readers