Skip to content
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

Fix reverse option for post_list #3082

Closed
wants to merge 1 commit into from
Closed

Conversation

@tbm
Copy link
Contributor

@tbm tbm commented May 9, 2018

reverse is never None since it's True or False.

reverse is never None since it's True or False.
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 9, 2018

Are you sure? The default argument passed to the function is False.

@tbm
Copy link
Contributor Author

@tbm tbm commented May 9, 2018

Are you sure? The default argument passed to the function is False.

My Python isn't good but it seems if something is False it's not None.

>>> reverse = False
>>> if reverse is None: print('yes')
... 
>>> reverse = True
>>> if reverse is None: print('yes')
... 
>>> reverse = None
>>> if reverse is None: print('yes')
... 
yes
>>> 

So basically the current test doesn't make sense because reverse is never "None". It's either True or False.

@Kwpolska Kwpolska closed this in 2cb25fb May 9, 2018
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 9, 2018

It is None if the input comes from reST. And the -1 argument makes stuff reversed. I fixed it in commit 2cb25fb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants