3 ms·
In Python 2 print 3/2 outputs 1 In Python 3 print(3/2) outputs 1.5 Even a language that is regarded as well designed has unexpected behaviour, it's not nece
by noir_lord 11y ago
In Python 2
print 3/2 outputs 1
In Python 3
print(3/2) outputs 1.5
Even a language that is regarded as well designed has unexpected behaviour, it's not necessarily wrong it's just not what the user expects.
They fixed it in 3 but does it's existence in 2 make Python a bad language?
PHP historically did a lot of stuff that a user wouldn't expect but they have started to clean that up, it won't happen overnight but the trend is there, strong and growing.
No such thing as a perfect programming language since everyone has a different definition of perfect.
- imakesnowflakes 11y agoI am not sure why you think It is unexpected behavior. And even if it is, it is not even in the same league as the quirks of Php. It would be if 3/2 outputs 1 but 7/2 outputs 3.5, both in Python 2. Then that would be unexpected behavior in the same league as that of Php's. > it won't happen overnight but the trend is there, strong and growing. It is just appearance. Just movement, not progress. I just provided you with an example on how new features added follows the same incompetent design, consistant with Php's track record. >No such thing as a perfect programming language since everyone has a different definition of perfect. Yea, there is no perfect one, But there is something that is too bad that should not be used. Php is that. It is not going to change.
- SannisDev 11y ago> Then that would be unexpected behavior in the same league as that of Php's. Can you provide any argued examples? I think not.
- imakesnowflakes 11y agoHere you go https://www.reddit.com/r/PHP/comments/41bm7j/new_rfc_allow_specifying_keys_in_list/cz1qnca https://www.reddit.com/r/PHP/comments/41bm7j/new_rfc_allow_s...