{"comment":{"commit_id":"b501b91f37aa52039b9574a0e56c229122f94768","created_at":"2011-12-15T15:57:57Z","position":null,"updated_at":"2011-12-15T15:57:57Z","user":{"gravatar_id":"893d2e4a728a7a86eba9d222a14ab6d5","id":846647,"url":"https://api.github.com/users/aaylward","avatar_url":"https://secure.gravatar.com/avatar/893d2e4a728a7a86eba9d222a14ab6d5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"aaylward"},"body":"an interesting gotcha:\r\n\r\npost_dict = dict((k,locals()[p]) for p,k in update_param_translation.iteritems() if locals().get(p)) creates an empty dictionary because locals() inside a generator refers to the variables defined inside the generator.\r\n\r\ncomprehensions are immune :)\r\n","id":797724,"path":null,"line":null,"html_url":"https://github.com/aaylward/hapipy/commit/b501b91f37#commitcomment-797724","url":"https://api.github.com/repos/aaylward/hapipy/comments/797724"}}