3 ms·
The standard libraries receive far, far more review, both at the API design and implementation level. Anyone can push literally anything to PyPI.
by mikepurvis 6y ago
The standard libraries receive far, far more review, both at the API design and implementation level. Anyone can push literally anything to PyPI.
- golergka 6y agoDepends on the library in question. I don't think that lodash doesn't get enough eyeballs on it.
- dmos62 6y agoYou have a point there, but if you have a very well vetted third-party library that provides things as basic as IP address parsing, you'll probably see that library included into the official library package.
- oblio 6y agoLodash might, or might not, offer the same guarantees that a stdlib generally offers: backwards and forwards compatibility, a clear deprecation and removal schedule, etc. It's great to have high quality third party libraries but stuff like most of lodash should be in a stdlib, already.
- mikepurvis 6y agoWell yes, but the point is that everything in the stdlib receives scrutiny and a long-term commitment to mainenance/upkeep. A small proportion of pypi/npm receives these things, but the vast majority is abandonware trash. You only have to briefly scroll through the main PyPI index to realise just how awful it is: https://pypi.org/simple/ https://pypi.org/simple/ (caution— multi-megabyte html)
- tveita 6y agoInterestingly the Python standard library behaves similarly (on Python 3.9.2): >>> import ipaddress >>> ipaddress.ip_address('010.0.0.1').is_private True Even though the documentation claims that "Leading zeroes are tolerated only for values less than 8 (as there is no ambiguity between the decimal and octal interpretations of such strings)." https://docs.python.org/3.9/library/ipaddress.html#ipaddress.IPv4Address https://docs.python.org/3.9/library/ipaddress.html#ipaddress...
- qwertox 6y agoSame in 3.8. Versions below 3.8 throw a ValueError. But this is not an issue: >>> import ipaddress >>> ipaddress.IPv4Address('010.0.0.1') IPv4Address('10.0.0.1')