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

Fixed #25825 --- Implemented __ne__ for template Origin #5736

Closed
wants to merge 1 commit into from

Conversation

jaap3
Copy link
Contributor

@jaap3 jaap3 commented Nov 27, 2015

@@ -151,6 +151,9 @@ def __eq__(self, other):
self.loader == other.loader
)

def __ne__(self, other):
Copy link
Member

Choose a reason for hiding this comment

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

This method is only necessary on Python 2, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct

Copy link
Member

Choose a reason for hiding this comment

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

Then we could slap an if six.PY2 around it, what do you think? That way we'll know to remove it when we drop Python 2 support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally don't think that's necessary. A grep for ne and similar Python 2 methods on the entire Django codebase will find this at that time in the future. But if you want to add it I'm fine with it :)

Copy link
Member

Choose a reason for hiding this comment

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

You're right. We don't have if six.PY2 for __ne__ methods anywhere else so let's keep it consistent.

Copy link
Member

Choose a reason for hiding this comment

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

FWIW I made sure we don't forget to remove these methods when we drop support for Python 2.

@timgraham
Copy link
Member

merged in c6ea4ed, thanks!

@timgraham timgraham closed this Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants