Every line of 'python dictionary extend' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
29 def extend(d, base): 30 return dict(d, **base)
75 def update(self, d): 76 for key in d.keys(): 77 # Ignore invalid keys, rather than raising an exception. 78 try: 79 skey = str(key) 80 except: 81 continue 82 if skey==key and not skey.startswith('_'): 83 self.__dict__[skey] = d[key]