Skip to content

Conversation

Vibhu-Agarwal
Copy link
Contributor

Deep down we're all the same: Input-Output of the explanation code

README.md Outdated
def __init__(self): print("I ")
def __del__(self): print("D ")
def __init__(self): print("I", end = " ")
def __del__(self): print("D", end = " ")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, end = " " is python 3 specific. That's why I omitted it initially 😅

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the output which we should change IMO to avoid breaking this on Python 2.x

Copy link
Contributor Author

@Vibhu-Agarwal Vibhu-Agarwal Aug 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's the case, then the output can be shown as

I
D
I
D
True

README.md Outdated
>>> id(WTF()) == id(WTF())
I D I D
I D I D True
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out and fixing it :)

Ref. example: Deep down, we're all the same
@satwikkansal satwikkansal merged commit ac379c9 into satwikkansal:master Aug 28, 2018
@satwikkansal
Copy link
Owner

Merged! Thank you so much @Vibhu-Agarwal for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants