Closed marinelay closed 2 months ago
The code looks as if the intention was always to use popitem
; anyway, when we finally drop py2 support, we could finally use keyword-only arguments here to get rid of all of this boilerplate.
Have you spotted more such uses throughout the code?
I couldn't find any other occurrences for dict.pop
like this issue
https://github.com/Gallopsled/pwntools/blob/5981c7290dd5190733c1f2e9ccf08633869f8b31/pwnlib/util/fiddling.py#L306-L330
At line 330, it raises the type error
TypeError: pop expected at least 1 argument, got 0
becausepop
method cannot be used without arguments.I believe that it should be fixed to report proper error message.