python-gsoc / python-blogs

Python Software Foundation GSoC Blog Platform. This system was used until 2024 but is no longer maintained.
http://python-gsoc.org/
GNU Affero General Public License v3.0
41 stars 60 forks source link

Default argument initialization with list found which is a loop hole in python #535

Closed neel004 closed 1 month ago

neel004 commented 1 year ago

Describe the bug When an argument is initialized with an empty list in python, it retains previous values it has accumulated while executing the method.

To Reproduce Steps to reproduce the behavior: Link to code: https://github.com/python-gsoc/python-blogs/blob/master/aldryn_people/cms_toolbars.py#L47:

Additional context Link for reference: https://web.archive.org/web/20200221224620id_/http://effbot.org/zone/default-values.htm

vrac10 commented 1 year ago

Can I work on this issue?

terriko commented 1 month ago

Closing in preparation for archiving this repo.