8. What's New in Python 3.4
実装
• file descriptor
• Isolated mode
• Codecs for non-text encodings
9. What's New in Python 3.4
ライブラリの向上
• Single-dispatch generic functions in functoools
• New pickle protocol 4
• SHA-3 (Keccak) support for hashlib.
• TLSv1.1 and TLSv1.2 support for ssl.
• multiprocessing now has option to avoid using
os.fork() on Unix
10. What's New in Python 3.4
CPython implementation
• Safe object finalization
• Configurable memory allocators
• Secure and interchangeable hash algorithm
• Improve finalization of Python modules to avoid setting
their globals to None, in most cases (issue 18214).
• A more efficient marshal format (issue 16475).
• “Argument Clinic”, an initial step towards providing
improved introspection support for builtin and standard
library extension types implemented in C (PEP 436)
40. 〜3.3
statistics
>>> def var(data):
...
n = len(data)
...
ss = sum(x**2 for x in data) –
...
(sum(data)**2)/n
... return ss/(n-1)
>>> var([1,2,3,4]))
1.6666666666666667
>>> var([x+1e12 for x in [1,2,3,4]]*100))
-1377834120.02005