IDL compiler: Sync Python to r162223

Sync per:
Improve remaining TypeErrors in bindings code.
https://codereview.chromium.org/36843003/

BUG=239771
NOTRY=true
TBR=haraken

Review URL: https://codereview.chromium.org/71203007

git-svn-id: svn://svn.chromium.org/blink/trunk@162260 bbb929c8-8fbe-4397-9dbb-9b2b20218538