From f0c254b10623be0333ed241271ed86665fc2eeea Mon Sep 17 00:00:00 2001 From: Satwik Kansal Date: Wed, 30 Aug 2017 16:50:39 +0530 Subject: [PATCH] Add Example Structure and Usage instructions sections. --- README.md | 62 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d17198e..44ccb8c 100755 --- a/README.md +++ b/README.md @@ -64,28 +64,50 @@ So, here ya go... +# Structure of the Examples + +Almost all the examples are structured like below: + +``` + ## Some fancy title + + (Optional) One line of what's happening: + + ```py + Preparing for the magic + ``` + + **Output (Python version):** + ```py + >>> triggering_statement + Probably unexpected output + ``` + + **Note:** All the examples mentioned below are run on Python 3.5.2 interactive interpreter unless explicitly specified. + + + ### Explanation: + * Brief explanation of what's happening and why is it happening. + ```py + Setting up examples for clarification (if required) + ``` + **Outupt:** + ```py + >>> trigger #some example that makes it easy to unveil the magic + # some justified output + ``` +``` + +# Usage + +A good way to go through these examples in my opinion will be to just to read them chronologically, and for every example: +- Carefully read the initial code for setting up the example. If you're an experienced Python programmer, most of the times you will successfully anticipate what's gonna happen next. +- Read the output snippets and check if + + The outputs are the same as you'd expect. + + You know the exact reason behind the output being the way it is. If no, read the explaination (and if you still don't understand, shout out and create an issue [here]()). If yes, give a gentle pat on your back and you may skip to the next example. + # 👀 Examples -**Environment:** All the examples mentioned below are run on Python 3.5.2 interactive interpreter unless explicitly specified. - -## Example heading - -One line of what's happening: - -```py -setting up -``` - -```py ->>> triggering_statement -weird output -``` - -### Explanation: - -* Better to give outside links -* or just explain again in brief - ## `datetime.time` object is considered to be false if it represented midnight in UTC ```py