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 comparison #60

Merged
merged 1 commit into from
Sep 15, 2015
Merged

Fixed comparison #60

merged 1 commit into from
Sep 15, 2015

Conversation

jacobilsoe
Copy link
Contributor

Fixed a number comparison (#55).

ohumbel added a commit that referenced this pull request Sep 15, 2015
@ohumbel ohumbel merged commit 6129440 into rtcTo:develop Sep 15, 2015
@jacobilsoe jacobilsoe deleted the resolverconfig branch September 15, 2015 18:15
@WtfJoke
Copy link
Member

WtfJoke commented Sep 15, 2015

A question here. Why the previous code didnt worked out? I see the failing test. Is it like an object comparsion thing?

EDIT: And for sure, thanks for the fix 👍

@jacobilsoe
Copy link
Contributor Author

Yes, it is a comparison issue. Try this in a python interpreter: 500 is len(range(500))
Then try: 100 is len(range(100))

@WtfJoke
Copy link
Member

WtfJoke commented Sep 15, 2015

Ah I see. How come it works until 100 ❓ That seems strange.

@ohumbel
Copy link
Member

ohumbel commented Sep 15, 2015

Maybe an implementation detail:

luna:rtc2git oti$ python3
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 500 is len(range(500))
False
>>> 100 is len(range(100))
True
>>> 200 is len(range(200))
True
>>> 300 is len(range(300))
False
>>> 250 is len(range(250))
True
>>> 255 is len(range(255))
True
>>> 256 is len(range(256))
True
>>> 257 is len(range(257))
False
>>>

@WtfJoke
Copy link
Member

WtfJoke commented Sep 15, 2015

Looks like. Thank you guys

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.

3 participants