-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
use dict instead of if/else logic #2093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| def dumps(self, value): | ||
| return json.dumps(_tag(value), separators=(',', ':')) | ||
|
|
||
| LOADS_MAP = { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
52dd249 to
d737d33
Compare
flask/sessions.py
Outdated
| ' u': uuid.UUID, | ||
| ' b': b64decode, | ||
| ' m': Markup, | ||
| ' d': parse_date |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
d737d33 to
9f886ef
Compare
flask/sessions.py
Outdated
| ' b': b64decode, | ||
| ' m': Markup, | ||
| ' d': parse_date, | ||
| } |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
9f886ef to
c7da9d5
Compare
|
Haven't looked at it in a while, but make sure this is in line with #1452. |
flask/sessions.py
Outdated
| elif the_key == ' d': | ||
| return parse_date(the_value) | ||
| # Check the key for a corresponding function | ||
| return_function = self.LOADS_MAP.get(the_key, None) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
c7da9d5 to
5c66bb2
Compare
No description provided.