Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Nicify results for more Python types #147

Closed
wants to merge 2 commits into from
Closed

Nicify results for more Python types #147

wants to merge 2 commits into from

Conversation

willkg
Copy link
Member

@willkg willkg commented May 15, 2013

  • 'T'/'F' (shows up in facet counts) get converted to True/False
  • '2013-05-20T15:55:11' things get converted to Python datetimes

This covers issue #72 and also fixes a backwards compatibility issue because pyes converted datetimes for us.

feedback?

* 'T'/'F' (shows up in facet counts) get converted to True/False
* '2013-05-20T15:55:11' things get converted to Python datetimes

"""
if isinstance(obj, basestring):
if len(obj) == 19:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice optimization.

@willkg
Copy link
Member Author

willkg commented May 15, 2013

Thank you for the thoughts! I'm going to twiddle with this a bit and then submit changes.

@willkg
Copy link
Member Author

willkg commented May 16, 2013

@robhudson ^^^ That covers all the things you mentioned, plus it slims the scope of things down a bit and makes it overrideable.

r?

@robhudson
Copy link
Member

Looks nice.

@willkg
Copy link
Member Author

willkg commented May 16, 2013

Landed in master: 90cfcde Fix backwards compatibility issue with ES results

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants