Mar-11-2019, 02:35 AM
(This post was last modified: Mar-11-2019, 02:35 AM by MingyuanLuo.)
(Mar-10-2019, 08:30 AM)Yoriz Wrote: The first use of getattr returned an attribute error because an empty string was given and no default was given. The second use of getattr was also given an empty string but because a default was provided the default value was returned instead.
def getattr(object, name, default=None)The default argument has None as default value.