Session.setdefault
- Session.setdefault(key, factory)
Return the value of key in the session. If key doesn’t exist in the session, assign and return the result of calling factory.
- Parameters:
- keystr
The session key.
- factoryCallable
A callable factory object to generate a valu if key is missing.
- Returns:
- Any