.
.
9 years ago in #python by emrebeyler (75)
$80.05
- Past Payouts $80.05
- - Author $66.02
- - Curators $14.03
127 votes
- appreciator: $24.57
- boomerang: $22.98
- bobbylee: $9.82
- rocky1: $7.54
- emrebeyler: $4.13
- uradick: $2.27
- therising: $2.02
- busy.pay: $1.55
- qustodian: $0.77
- htooms: $0.66
- nichoros: $0.63
- muratkbesiroglu: $0.49
- make-a-whale: $0.34
- oendertuerk: $0.20
- zoltarian: $0.18
- danielsaori: $0.17
- jumbot: $0.16
- espoem: $0.15
- ruel.cedeno: $0.15
- boontjie: $0.14
- and 107 more
==tests if they are equal, andisis testing if they are the same object.They are the same value so
==succeeds, but they are not the same reference soisfails.That can really cause some confusion. :)
Using
isand testing with small integers, only to later find out it fails with larger values.You should only use is with None. For there is and can only ever be one object of type NoneType. If a routine may return None, we know it isthe same constant None object used everywhere in Python.
That is if a==None and b==None then a is b. However, no such identity should be assumed for values other than None.
Followed and voted for Witness: thanks @emrebeyler for all cool things you do!
Have a happy day! ;)
very good idea.I also read your post.
I voted for you brother but never forget me when you will be a whale.
This post has received a 24.81 % upvote from @boomerang.
i vote you as a witnesses. plz upvote my comment