3 ms·
A few issues from our Python analyzer: * Dangerous mutable default argument passed in functions ``` def some_func(arg=[1,2,3]): ... ``` which should be
by sanketsaurav 7y ago
A few issues from our Python analyzer:
* Dangerous mutable default argument passed in functions
```
def some_func(arg=[1,2,3]):
...
```
which should be
```
def some_func(arg=None):
if arg is None: arg = [1,2,3]
...
```
* `yield` used inside a comprehension (which breaks code in Python 3.8)
* file opened with the "r" flag, but a write is attempted on the file
* i/o detected on a closed file descriptor
* providing an unexpected keyword argument in a function call