Python Forum
is this a bug or not with if...else...?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is this a bug or not with if...else...?
#5
Accepted (and more efficient) form of None value check is is/is not

if a is None:
.....
if b is not None:
.....
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
is this a bug or not with if...else...? - by meokey - Sep-02-2018, 09:29 PM
RE: is this a bug or not with if...else...? - by volcano63 - Sep-03-2018, 04:13 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020