2 ms·
Their is no way to tell that the example function is not a method of a Person class. The code: "def update(person, name=None, age=None):" is equivelent to the
by gizmo686 14y ago
Their is no way to tell that the example function is not a method of a Person class.
The code:
"def update(person, name=None, age=None):"
is equivelent to the code:
"def update(self, name=None, age=None):"
although if you chose to name the 'self' variable something other than 'self', you probably deserve to have problems.
- shmeedogg 14y agoAgreed, I think the distinction between a bound method or a function is irrelevant here. If we want explicit kwargs (a big 'if' since many of the suggestions in this thread are to give up on that idea), then we need some value to distinguish it from None.