keithlackey wrote: > I'm relatively new to python and I've run into this problem. This has two very standard mistakes: First, as noted by Sybren, messages should just use spaces in order to be readable. After correcting that one: > class structure: > def __init__(self, folders = []): > self.folders = folders > ... Here is the second one. Default args are not rebuilt, but shared. The correct way to do this is: class structure: def __init__(self, folders=None): if folders is None: self.folders = [] else: self.folders = folders ... --Scott David Daniels Scott.Daniels at Acm.Org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4