From c1e60afe5baedfbf57d30904315ea12963a1de8a Mon Sep 17 00:00:00 2001 From: PierreQuentel Date: Sat, 29 Jun 2024 08:31:31 +0200 Subject: [PATCH] Add __dict__ to instances of class $io --- www/src/brython.js | 6 +++--- www/src/builtin_modules.js | 1 + www/src/version_info.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/www/src/brython.js b/www/src/brython.js index 7400e3af3..13438c35e 100644 --- a/www/src/brython.js +++ b/www/src/brython.js @@ -180,8 +180,8 @@ $B.unicode_bidi_whitespace=[9,10,11,12,13,28,29,30,31,32,133,5760,8192,8193,8194 ; __BRYTHON__.implementation=[3,12,3,'dev',0] __BRYTHON__.version_info=[3,12,0,'final',0] -__BRYTHON__.compiled_date="2024-06-29 08:12:09.703917" -__BRYTHON__.timestamp=1719641529703 +__BRYTHON__.compiled_date="2024-06-29 08:30:09.916699" +__BRYTHON__.timestamp=1719642609916 __BRYTHON__.builtin_module_names=["_ajax","_ast","_base64","_binascii","_io_classes","_json","_jsre","_locale","_multiprocessing","_posixsubprocess","_profile","_random","_sre","_sre_utils","_string","_strptime","_svg","_symtable","_tokenize","_webcomponent","_webworker","_zlib_utils","_zlib_utils1","_zlib_utils_kozh","array","builtins","dis","encoding_cp932","encoding_cp932_v2","hashlib","html_parser","marshal","math","modulefinder","posix","pyexpat","python_re","python_re_new","unicodedata","xml_helpers","xml_parser","xml_parser_backup"] ; @@ -11012,7 +11012,7 @@ return ''} $B.set_func_names(modules.javascript.NullType,'javascript') modules.javascript.UndefinedType.__module__='javascript' var $io=$B.$io=$B.make_class("io",function(out){return{ -__class__:$io,out,encoding:'utf-8'}} +__class__:$io,__dict__:$B.empty_dict(),out,encoding:'utf-8'}} ) $io.flush=function(self){if(self.buf){ var s=self.buf.join(''),chr0=String.fromCodePoint(0) diff --git a/www/src/builtin_modules.js b/www/src/builtin_modules.js index 533fc7e86..cc0df4543 100644 --- a/www/src/builtin_modules.js +++ b/www/src/builtin_modules.js @@ -624,6 +624,7 @@ function(out){ return { __class__: $io, + __dict__: $B.empty_dict(), out, encoding: 'utf-8' } diff --git a/www/src/version_info.js b/www/src/version_info.js index 0a43ae88f..fd19634f5 100644 --- a/www/src/version_info.js +++ b/www/src/version_info.js @@ -1,7 +1,7 @@ __BRYTHON__.implementation = [3, 12, 3, 'dev', 0] __BRYTHON__.version_info = [3, 12, 0, 'final', 0] -__BRYTHON__.compiled_date = "2024-06-29 08:12:09.703917" -__BRYTHON__.timestamp = 1719641529703 +__BRYTHON__.compiled_date = "2024-06-29 08:30:09.916699" +__BRYTHON__.timestamp = 1719642609916 __BRYTHON__.builtin_module_names = ["_ajax", "_ast", "_base64",