In the example above, self.b is assigned the value of b, not Enum(b). And even if you called-- or gave the option to call-- func(*args, **kwargs) first, autoassign still wouldn't know that you want to modify the supplied parameter value.

But you could just write `self.b = MyEnum(b)`, and it would overwrite the auto-assigned `self.b = b`.

I.... didn't think of that. In that case, though, you're assigning self.b twice. If it is a descriptor, that might not be desirable and result in all kinds of side effects.

 
The  get_partial_namespace() method would basically be the same as locals(), except: 1. the name bound to the object that called the function is excluded (self) and 2. any other names that were not part of the call of the function are excluded.

This sounds very similar to Steven's parameters() proposal. 

It might be; I'm being a bad interlocutor and jumping in without having read the entire discussion as thoroughly as I should. Apologies.
 

---
Ricky.

"I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler