From 58bff7143658d3a64397c2c13930154136431426 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Thu, 9 Apr 2015 21:20:00 +0100 Subject: [PATCH] Updated Nim for Python Programmers (markdown) --- Nim-for-Python-Programmers.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Nim-for-Python-Programmers.md b/Nim-for-Python-Programmers.md index 1c59b31..b2fb875 100644 --- a/Nim-for-Python-Programmers.md +++ b/Nim-for-Python-Programmers.md @@ -147,3 +147,10 @@ Use [Tables](http://nim-lang.org/tables.html) See [this](http://rosettacode.org/wiki/Abstract_type#Nim) +### Ternary operator + +``` Nim +var is_happy = if has_cat(): "quite" else: "not much" +``` + +