Re:Making Python's __init__ method magical
by jwegan on Friday January 03, 2014 @12:16PM
(#7006580)
I prefer the simpler:
[ Parent
| on HN ]
Seriously, I couldn't finish the article once I saw he wasn't using locals. Is there some hidden gotcha that we are missing here that he's taking care of with his more complicated approach?
Re:Making Python's __init__ method magical
by nollidge on Friday January 03, 2014 @01:14PM
(#7007002)
Because that would include non-argument locals, if you have any.
Re:Making Python's __init__ method magical
by oinksoft on Friday January 03, 2014 @12:48PM
(#7006798)
I don't like code to casually access the inner dict. Now you have to maintain your `k != 'self'` (ugly in its own right) for each argument you want to exclude from this rule. The explicit version is superior, this is needlessly slow and complicated.