Brython Не удается прочитать свойство '$ nat' из неопределенного - PullRequest
0 голосов
/ 12 ноября 2018

Ошибка с питоном в браузере. Может ли кто-нибудь предположить, что обходной путь может быть ? ошибка может быть легко воспроизведена в консоли brython.info :

Brython 3.7.0 on Netscape 5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

a=b'123'
b=b'1'
b in a

это ошибка в консоли js:

js exc TypeError: Cannot read property '$nat' of undefined
    at check_no_kw (brython.js:5920)
    at isinstance (brython.js:6356)
    at Object.list.__eq__ (brython.js:9850)
    at method (brython.js:6266)
    at bytes.__eq__ (brython.js:7279)
    at method (brython.js:4901)
    at Object.int.__eq__ (brython.js:8722)
    at method (brython.js:6266)
    at Object.$B.rich_comp (brython.js:5884)
    at Object.$B.$is_member (brython.js:5593)
brython.js:7035 (2) [Array(5), Array(4)]0: (5) ["__main___myKeyPress_14", {…}, "__main__", {…}, ƒ]1: (4) ["$exec_1984", {…}, "$exec_1984", {…}]length: 2__proto__: Array(0)
brython.js:6983 no class TypeError: Cannot read property '$nat' of undefined
    at check_no_kw (brython.js:5920)
    at isinstance (brython.js:6356)
    at Object.list.__eq__ (brython.js:9850)
    at method (brython.js:6266)
    at bytes.__eq__ (brython.js:7279)
    at method (brython.js:4901)
    at Object.int.__eq__ (brython.js:8722)
    at method (brython.js:6266)
    at Object.$B.rich_comp (brython.js:5884)
    at Object.$B.$is_member (brython.js:5593)
brython.js:4922 Error
    at Object._b_.AttributeError.$factory (eval at $make_exc (brython.js:7073), <anonymous>:31:340)
    at BaseException.__getattr__ (brython.js:7009)
    at __BRYTHON__.builtins.object.object.__getattribute__ (brython.js:4921)
    at Object.$B.$getattr (brython.js:6283)
    at Object.$B.$bool (brython.js:8997)
    at Object.bool.$factory (brython.js:9022)
    at Object.$B.$test_item (brython.js:5579)
    at __init__194 (eval at run_py (brython.js:8050), <anonymous>:2038:78)
    at factory (brython.js:5239)
    at print_exception161 (eval at run_py (brython.js:8050), <anonymous>:329:138)
`
...