Jump to content

peawormsworth

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About peawormsworth

  • Rank
    Newbie
  1. I believe this page: https://www.w3schools.com/python/ref_keyword_assert.asp has incorrect wording on the 2nd example. The assertion checks for the presence of 'goodbye' in x, but the message says that "x should be 'hello'". When the assertion is false the error message will appear. However, the message says it should be 'hello' when IT IS 'hello'. That is not logical according to the english words used in the error message. I think the code should be: x = "goodbye" #if condition returns False, AssertionError is raised: assert x == "hello", "x should be 'hello'" It will report "x
×
×
  • Create New...