From f38e7986bc7421a293e7359de553e480405610ea Mon Sep 17 00:00:00 2001 From: Nicolas Dubois Date: Fri, 26 Sep 2014 22:17:34 +0200 Subject: [PATCH] Add wo0dyn's --- wo0ydn/README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 wo0ydn/README.md diff --git a/wo0ydn/README.md b/wo0ydn/README.md new file mode 100644 index 0000000..45e8ac2 --- /dev/null +++ b/wo0ydn/README.md @@ -0,0 +1,56 @@ +# Dreams + +## Unicode operators + +| Old python operator | New awesome one | +|:-------------------:|:---------------:| +| >= | ≥ | +| <= | ≤ | +| != | ≠ | +| not | ¬ | +| x ** 1/2 | √x | +| x ** 2 | x² | +| x ** 3 | x³ | + +```python +if x ≥ 10 and ¬found: + # code + +if x² ≠ 10: + # code +``` + +## More greek letters + +Because, it would be awesome to write: + +```python +from datetime import datetime + +start = datetime.now() +# code +∆t = datetime.now() - start +print("Time: {}ms".format(∆t)) +``` + +## Redefine assignment/equality + +| Operation | Old python | New awesome one | +|:----------:|:----------:|:---------------:| +| Assignment | = | : | +| Equality | == | = | + +```python +start: datetime.now() +# code +∆t: datetime.now() - start + +if ∆t = 0: + print("WOW, that was fast!") +``` + +## Others + +* Easy packaging +* All libraries available in Python3 +* More cleaner API on some stdlib (like logging.getLogger → logging.get_logger) \ No newline at end of file