Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strange logic! :)
#11
(May-19-2017, 10:03 PM)nilamo Wrote:
(May-05-2017, 01:03 PM)volcano63 Wrote: if (3 = x) is illegal assignment, failing compilation.
I do this all the time, because I like when the compiler tells me I'm stupid.  I believe it's commonly referred to as yoda checking, because it sounds backwards. (https://en.wikipedia.org/wiki/Yoda_conditions)
Since I don't miss C Snooty , i never do that - and we have lots of opportunities to be told we are stupid by compiler/interpreter Tongue
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


Forum Jump:

User Panel Messages

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