Skip to content
Browse files

edit

  • Loading branch information...
1 parent 7fc9605 commit 352b823ad5e271d94d7475ae997221707ddb3c50 @scq scq committed with anandology
Showing with 3 additions and 3 deletions.
  1. +3 −3 cookbook/cookies.md
View
6 cookbook/cookies.md
@@ -69,6 +69,8 @@ Sometimes, you want to know specifically if something doesn't exist, in which ca
# Do whatever handling you need to, etc. here.
return "Cookie does not exist."
+This code attempts to use the cookie submitted by the browser, but does not give it a default value. If the cookie doesn't exist, an exception is raised, and the `except` clause is executed, giving the server an opportunity to handle the lack of cookie.
+
or
class CookieGet:
@@ -77,6 +79,4 @@ or
if age:
return "Your age is: %s" % age
else:
- return "Cookie does not exist."
-
-This code attempts to use the cookie submitted by the browser, but does not give it a default value. If the cookie doesn't exist, an exception is raised, and the `except` clause is executed, giving the server an opportunity to handle the lack of cookie.
+ return "Cookie does not exist."

0 comments on commit 352b823

Please sign in to comment.
Something went wrong with that request. Please try again.