Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

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

Closed
neel004 opened this issue Nov 16, 2022 · 2 comments
Closed

Comments

@neel004
Copy link

neel004 commented Nov 16, 2022

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
Copy link

vrac10 commented Jan 18, 2023

Can I work on this issue?

@vrac10 vrac10 mentioned this issue Jan 18, 2023
8 tasks
@terriko
Copy link
Member

terriko commented Aug 26, 2024

Closing in preparation for archiving this repo.

@terriko terriko closed this as completed Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants