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

Make uniquelist work both as module and a script #123

Merged
merged 1 commit into from
Nov 3, 2017

Conversation

llimeht
Copy link
Contributor

@llimeht llimeht commented Nov 2, 2017

The details of __builtin__, __builtins__ and builtins differ according to whether it's a script of a module and between Python 2 and 3. This PR regularises uniquelist to work in all these situations.

Notes:

  • this function appears to be unused in any case; perhaps just remove the file instead?
  • avoiding using the names of builtins such as hash as variables (and list which is (ab)used extensively in sasview) would avoid this too

(BTW I discovered this bug because py.test accidentally picked up the file and ran the test and it failed)

Copy link
Contributor

@pkienzle pkienzle left a comment

Choose a reason for hiding this comment

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

Since uniquelist is not referenced anywhere in sasview, just get rid of it instead of adding 2-vs-3 cruft.

@pkienzle pkienzle merged commit 08b9e33 into SasView:master Nov 3, 2017
@llimeht llimeht deleted the tmp/uniquelist branch November 4, 2017 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants