Brython-3.0.2 發布,Python 替代 JavaScript

jopen 9年前發布 | 7K 次閱讀 Brython

Brython 設計用于替換網頁上的 JavaScript 腳本語言,它使用 Python 來編寫腳本,并直接在網頁上執行。

Brython-3.0.2 發布,此版本主要是修改字典的實現,性能方面有大幅度的提升;同時還修復了一些 Brython 網站瀏覽器版本的 bug。

此版本現已提供下載,以下詳細更新內容:

Changes in Brython version 3.0.2
================================



New features
============

Implementation
==============

  • destroy internal variables after comprehensions and generator expressions
      are executed
  • add URLParameter function to browser module (by Billy Earney)
  • new, much faster dict implementation (by James Hutchison and Billy Earney)
  • dramatic performance improvement of str.format when format has 2 or more {}
      (by Mike "mrwwalmsley")
  • add UUID function, replace some indent code with customized repeat functions
      (by Billy Earney)

    Bug fixes
    =========
  • sys.stderr and sys.stdout can be reset (previously, only sys.stderr.write
      and sys.stdout.write could be)
  • raise errors for assignment to None, True, False, debug
  • fix bug in dir()
  • string representation of functions and class methods are more compliant with
      that of CPython
  • restore "throw" as a forbidden attribute (this broke Brython for some
      browsers on smartphones)

    Issues
  • issue #68 : possible silent overflow of larger ints (the bug is not fixed,
      but the results are more sensible)
  • issue #82 : Ellipsis literal (...) missing
  • issue #83 : sys.version_info bug (by Billy Earney)
  • issue #84 : displaying the false(y) values in Brython console

    Brython site
    ============
  • improved slideshow
  • update JSON test (the expected result was incorrect for one of the tests)
  • remove invalid "width" ace.js parameter (by Billy Earney)

    Demos
    =====

    Standard distribution
    =====================
  • in browser.html and browser.svg, underscores in keywords are translated into
      hyphens : svg.rect(font_size=22) is correctly handled, with SVG attribute
      font-style set
  • changes to random.py to make it load much faster. Makes the replacement
      module __random useless
  • changes to re.py to make it load faster

    Documentation
    =============
  • move bind/unbind demo from gallery to cookbook
  • a few spelling corrections (by Dawson Botford)
  • fix an error in README.md (suggested by Roger Erens)
  • document improvement in browser.html and browser.svg
  • more document files use the built-in highlighting syntax module
  • change doc of the local storage modules (fr and en versions)
 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!