Fix a couple of typos (#507) [skip ci]

This commit is contained in:
Michael Wood 2020-07-13 18:29:24 +02:00 committed by GitHub
parent 71004afd01
commit 8bdceada9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -568,11 +568,11 @@ Babashka sets the following system properties:
- `babashka.main`: the `--main` argument
- `babashka.file`: the `--file` argument (normalized using `.getCanonicalPath`)
## `__name__ = "__main__"` pattern
## `__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, or loaded from another file: the
`__name__ = "__main__"` pattern. In babashka this pattern can be implemented with:
`__name__ == "__main__"` pattern. In babashka this pattern can be implemented with:
``` clojure
(= *file* (System/getProperty "babashka.file")