Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • How can a user type in a Python expression that is that specific object SENTINEL? Commented 22 hours ago
  • @Booboo the question is unclear; are you asking for something different to five_characters is SENTINEL, which is in the answer? Commented 22 hours ago
  • @Booboo They wouldn't unless I'm misunderstanding the original question. If the input fails and an error is caught, the user_input will remain as the sentinel. Commented 22 hours ago
  • @jonrsharpe I was looking at the first code example posted by the OP. It makes no sense to me since the user can never enter something that when evaluated is SENTINEL. Commented 21 hours ago
  • 1
    You don't want them to @Booboo, the point is to have a value that represents no input independent of any value the user could enter (in this case not None because they could enter 'None'). Commented 21 hours ago