Fokko opened a new pull request, #5465:
URL: https://github.com/apache/iceberg/pull/5465

   This makes it much easier to merge all the dictionaries later on. I first 
tried this with the frozendict package, but we want to keep pyiceberg light, 
therefore I decided to extend the Python dictionary, and throw an 
AttributeError when you try to mutate the dict.
   
   The dict needs to be immutable because the default value points to the same 
object. If you mutate that one, it the next time you'll use the default value, 
it won't be empty anymore (and will end up with some very unexpected behavior). 
More information here: 
https://florimond.dev/en/posts/2018/08/python-mutable-defaults-are-the-source-of-all-evil/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to