From 101684de2813bc64b3fb69cae8f52bfb81d63006 Mon Sep 17 00:00:00 2001 From: Vibhu Agarwal Date: Mon, 13 Aug 2018 11:12:51 +0530 Subject: [PATCH] Fixed input-output of 4th example explanation code Deep down we're all the same: Input-Output formatting of the explanation code https://github.com/satwikkansal/wtfpython#-deep-down-were-all-the-same- --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 92f515b..a6eb0ec 100644 --- a/README.md +++ b/README.md @@ -296,16 +296,16 @@ True * But why did the `is` operator evaluated to `False`? Let's see with this snippet. ```py class WTF(object): - def __init__(self): print("I ") - def __del__(self): print("D ") + def __init__(self): print("I", end = " ") + def __del__(self): print("D", end = " ") ``` **Output:** ```py >>> WTF() is WTF() - I I D D + I I D D False >>> id(WTF()) == id(WTF()) - I D I D + I D I D True ``` As you may observe, the order in which the objects are destroyed is what made all the difference here.