Changes in Brython version 2.1-20140412-152157 ============================================== Brython 2.1.0 is a backwards-compatible version New features ============ - the main change in this version is a major improvement in the implementation of generators. Brython now supports all the features of Python generators, including the methods send, throw, close, and the syntax "yield from" - much improved support of str.format() - improvement to regular expression modules - remove all the attributes previously set to native Javascript object prototypes, such as String.prototype.__class__ - more efficient version of class StringIO - add 'base' as second argument of built-in function int() - add methods maketrans and translate to bytes - add classes DOMNode and DOMEvent and object "console" to module browser - improvements to import (start with stdlib, then current directory) - add on option "ipy_id" to the brython() function to run scripts on demand - add HTMLTestRunner for better looking unittests - add keyword "file" to function "print" Bug fixes ========= - JSObject : . if an attribute of a JSObject is a function, convert the Python argument into equivalent Javascript objects . if the argument is a function, return it unchanged . if the attribute addEventListener of an object exists, translate "bind" to this attribute - issues in module math.js ; in ternary operator - in "with X as Y" inside a function, add Y to function local vars - bug when a line ends with a comma in an implicit tuple ("del a, ") - bug with "raise exc" if exc is an instance, not a class - bug when assigning exec(src) to an attribute or subscription - bug with "a, = X" and "x = 1," ; "def foo(a,)" or "def foo(a=1,)" failed - bug in string formatting with formats %d and %f - bug when running some modules with debug mode not set - bug with augmented assignment in class body - bug with reporting a LocalUnboundError - many bugs in documentation pages - issue 146 : method clear() of DOMNode instances - issue 182 : attribute id of DOMNode instances - issue 210 : bug in attribute resolution - issue 212 : bug in function super() - issue 213 : handle argument -0 differently than 0 - issue 214 : wrong operator precedence in ternary operator - issue 216 : bug with bytes and with boolean __str__ method - issue 219 : bug with unary operator - issue 220 : format method of strings only accepts two parameters - issue 222 : attribute __ne__ of class objects - issue 231 : absolute path of brython.js - issue 233 : JSObject not working as expected - issue 235 : "functools.reduce" is broken - issue 237 : "for i in -1, 0, 1" raises SyntaxError - issue 236 : assignment to a "starred" target (eg a,*b = [1, 2, 3]) - issue 238 : operator.itemgetter returns incorrect result - issue 239 : empty string in empty string $ - issue 240 : dict.fromkeys is undefined Demos ===== - AZERTY russian keyboard - test battery management (by Nicolas Pinault) Standard distribution ===================== - add modules from the standard CPython distribution : pwd, pydoc, unitest/result; xml, urllib.parse - upgrade modules to Python version 3.3.3 - add support of site-packages for 3rd party modules - remove pydom and slideshow from Brython distribution (both are published as separate projects) Documentation ============= - update of the Portuguese translation by Yuri Texeira, and Spanish by Kiko Corresoso - add documentation on developing webapps for Firefox OS - add a FAQ page