5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
codereviewdoctor.medium.com
5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
1–10 of 339 posts
Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#2Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#3I've been bitten by this one at work, and can't help but think it is an insane behaviour, given that ['foo' + 'bar'] explicitly concatenates the strings, and ['foo', 'bar'] is the much more common desired result.
edit: This also applies to un-separated strings, so ['foo''bar'] also becomes ['foobar']
Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#4And there’s no evaluation of importance as to whether these instances are in test files or non-critical code. Packages are big and can have hundreds or thousands of files.
It could be that if these mattered, they would have been detected and fixed.
A good example for unit tests and perhaps checking to see if these bugs are covered or not covered.
I like these kinds of analyses but don’t like the presented like it’s some significant failure.
Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#5Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#6https://github.com/PyCQA/pylint/issues/1589
Is there usually enough context for a linter to make an educated guess?
Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#7tl;dr: Python concatenates space separated strings, so ['foo' 'bar'] becomes ['foobar'], leading to silent bugs due to typos. I've been bitten by this one at work, and can't help but think it is an insane behaviour, given that ['foo' + 'bar'] explicitly concatenates the strings, and ['foo', 'bar'] is the much more common desired result. edit: This also applies to un-separated strings, so ['foo''bar'] also becomes ['f…
I don't think it fits well in python
Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#8Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#9Re: 5% of 666 Python repos had comma typo bugs (inc V8, TensorFlow and PyTorch)
#10tl;dr: Python concatenates space separated strings, so ['foo' 'bar'] becomes ['foobar'], leading to silent bugs due to typos. I've been bitten by this one at work, and can't help but think it is an insane behaviour, given that ['foo' + 'bar'] explicitly concatenates the strings, and ['foo', 'bar'] is the much more common desired result. edit: This also applies to un-separated strings, so ['foo''bar'] also becomes ['f…
I assume it's based on the C behavior, where it can be handy with macros I don't think it fits well in python