Is it possible to change the changed object returned by the standard library object method?
Here is one specific example; but I am looking for a general answer if possible.
g, v = m.groupdict().popitem()
Is this code safe? I'm worried that by modifying groupdict () I am distorting the m object (which I still need for later).
I checked this, and the subsequent call to m.groupdict () still returned the original dictionary; but for everyone I know, this may be implementation dependent.
source
share