Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change mutable default arguments to
None
(#6376)
Reading PyG code I accidently saw that class and noticed that it uses mutable default arguments what is generally considered a bad practice and can lead to a lot of problems. I believe it's not a desired behaviour (am I wrong?). Problems can occur when the class is extended in the future such that it changes the value of any of those lists, the default value for new instances of this class would also be affected. The other possibility is that user changes any of the `follow_batch`, `exclude_keys` fields (those doesn't start with an underscore, so it's kinda possible) after the object is initialized, what's also going to change the default value for new instances. Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
- Loading branch information