Skip to content

Conversation

@mnunberg
Copy link
Contributor

Might still need some tests

@mnunberg mnunberg requested a review from dvirsky October 25, 2017 12:39
@mnunberg
Copy link
Contributor Author

actually.. I'm writing tests and there are indeed a few bugs :)

self._return_fields = fields
return self

def summarize(self, *fields, **options):
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer that the kwargs will have the defaults already. I hate it when python code sends you on an RTFM mission to decipher what **kwargs actually mean...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem with this is that it disallows me from specifying multiple fields, and the user must then do one field at a time. I guess it's acceptable, but annoying.

self._summarize_fields = args
return self

def highlight(self, *fields, **options):
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, provide keyword arguments with sane defaults here...

@dvirsky
Copy link
Contributor

dvirsky commented Oct 25, 2017

Looks good besides the **options thing which I would rewrite as defaults.

Please also regenerate the docs with gendocs.py redisearch and pipe the resulting MD to the redisearch docs python api markdown.

Thanks!

@mnunberg
Copy link
Contributor Author

mnunberg commented Nov 7, 2017

Using highlight-api branch instead. Will reopen PR

@mnunberg mnunberg closed this Nov 7, 2017
@ashtul ashtul deleted the api-updates branch July 6, 2020 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants