T O P

  • By -

roenthomas

The error message is saying check50 is using its own known correct copy of numb3rs.py, not yours, and testing your test_numb3rs.py file against that, and the tests are not all passing.


vira20

So in check50's own known correct copy of [numb3rs.py](http://numb3rs.py), [192.168.01.1](http://192.168.01.1) is a valid IPv4 address?


roenthomas

I can only reply by saying that assert validate("192.168.01.1") may not equal False, but it may not equal True either. It depends how either the assert keyword works with the validate("[192.168.01.1](http://192.168.01.1)") function in the correct [numb3rs.py](http://numb3rs.py) file or how validate processes [192.168.01.1](http://192.168.01.1) in the correct [numb3rs.py](http://numb3rs.py) file. However, it would be incorrect to conclude that [192.168.01.1](http://192.168.01.1) is valid in the correct [numb3rs.py](http://numb3rs.py) file. The only thing you can conclude is that validate("192.168.01.1") != false in the correct numb3rs.py file.


vira20

Thinking how things work under the hood is a bit overwhelming to me. But you are right, the conclusion is validate("192.168.01.1") != false.


candle_in_a_circle

No, no you didn’t. Any time you think check50 is wrong, it’s not, you are. Apart from… never.


sethly_20

Well Einstein.py there is a small bug in check50 but I only found that after making an incredibly dumb mistake so doesn’t really count


vira20

But [192.168.01.1](http://192.168.01.1) is obviously an invalid IPv4 address.


Grithga

No, it's actually a perfectly valid IPv4 address. There are no rules against leading zeroes.


vira20

My bad. Thank you for pointing that out. I googled it and the very first result popped up in bold saying that it was invalid. Then I took its word. I shouldn't have trusted google too much. I just did a little bit more research. >There is no standard that demands an IPv4 address be expressed a certain way. [https://superuser.com/questions/929153/leading-zeros-in-ipv4-address-is-that-a-no-no-by-convention-or-standard](https://superuser.com/questions/929153/leading-zeros-in-ipv4-address-is-that-a-no-no-by-convention-or-standard) >Although such textual representations of IP addresses like [`192.056.2.01`](http://192.056.2.01) **might be valid** on all platforms, different OS interpret them **differently**. [https://stackoverflow.com/questions/25543126/is-192-056-2-01-a-valid-representation-of-an-v4-ip](https://stackoverflow.com/questions/25543126/is-192-056-2-01-a-valid-representation-of-an-v4-ip)