SyntaxFix
Write A Post
Hire A Developer
Questions
You'd do
self.attribute = kwargs.pop('name', default_value)
or
self.attribute = kwargs.get('name', default_value)
If you use pop, then you can check if there are any spurious values sent, and take the appropriate action (if any).
pop