Skip to content
Snippets Groups Projects
Commit 73a098a4 authored by Bob Lantz's avatar Bob Lantz
Browse files

Use __dict__.update to update an object's fields.

parent eaf5888a
No related branches found
No related tags found
No related merge requests found
......@@ -448,8 +448,7 @@ def quit( self ):
def assign( obj, **kwargs ):
"Set a bunch of fields in an object."
for name, value in kwargs.items():
setattr( obj, name, value )
obj.__dict__.update( kwargs )
class Object( object ):
"Generic object you can stuff junk into."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment