[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)
STINNER Victor added the comment: Could you please provide bench_translate.py? Oh, I forgot to add it :-( -- Added file: http://bugs.python.org/file34744/bench_translate.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings
New submission from STINNER Victor: In issue #21118, I optimized str.translate() in Python 3.5 for ASCII 1:1 mapping and ASCII deletion. My optimization is not used if a character is replaced with a string (ex: abc.translate({ord('a'): xxx})) and for non-ASCII strings. translate_script.py is a simple benchmark for 1:1 mapping. It should be enhanced to benchmark also replacement strings. -- files: translate_script.py messages: 215677 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Optimize str.translate() for replacement with substrings and non-ASCII strings type: performance versions: Python 3.5 Added file: http://bugs.python.org/file34745/translate_script.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21165 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)
STINNER Victor added the comment: Do you plan to backport bug fixes to 3.3 and 2.7? Which commit? 3.3 is no more open to bug fixes, only to security fixes. New changeset 95d4e8124c6a by Victor Stinner in branch 'default': Issue #21118: Fix _PyUnicodeTranslateError_Create(), add missing format http://hg.python.org/cpython/rev/95d4e8124c6a Python 2.7 is not affected by this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21155] asyncio: calling _UnixSelectorEventLoop.create_unix_server(sock=..., path=...) must fail
Roundup Robot added the comment: New changeset a6b764848b20 by Victor Stinner in branch '3.4': Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError if http://hg.python.org/cpython/rev/a6b764848b20 New changeset 34ace7eb67e9 by Victor Stinner in branch 'default': (Merge 3.4) Issue #21155: asyncio.EventLoop.create_unix_server() now raises a http://hg.python.org/cpython/rev/34ace7eb67e9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21155 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21155] asyncio: calling _UnixSelectorEventLoop.create_unix_server(sock=..., path=...) must fail
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21155 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)
STINNER Victor added the comment: I opened the issue #21165 to discuss a more generic optimization of str.translate(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings
STINNER Victor added the comment: codecs.charmap_build() (PyUnicode_BuildEncodingMap()) creates a C array (a three-level trie) for fast lookup. It is used with codecs.charmap_encode() for 8-bit encodings. We may reuse it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21165 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist
STINNER Victor added the comment: P.P.S.: Just a random idea: would it be a to rewrite PyLong to use GMP instead as a PyVarObject of mp_limb_t's? I'll let Victor answer that one. :-) In the mean time, see issue 1814. During the development of Python 3.0, I wrote a large patch to reuse directly GMP for Python int. My conclusion is here: http://bugs.python.org/issue1814#msg77018 (hint: it's not a good idea) IMO the first problem is the memory allocation. GMP type doesn't fit well with Python type. GMP type for int has a fixed size, and then GMP allocates a second structure for digits. It's inefficient for small integers, and almost all Python int are small (smaller than 32 or 64 bits). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21166] Bus error on AMD64 FreeBSD 9.x 3.4 buildbot
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/44/steps/compile/logs/stdio ./python -E -S -m sysconfig --generate-posix-vars Bus error (core dumped) http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4 -- messages: 215683 nosy: haypo priority: normal severity: normal status: open title: Bus error on AMD64 FreeBSD 9.x 3.4 buildbot versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21166 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs
STINNER Victor added the comment: test_default_ecdh_curve() is still failing on x86 Ubuntu Shared 3.x: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/9964/steps/test/logs/stdio == ERROR: test_default_ecdh_curve (test.test_ssl.ThreadedTests) -- Traceback (most recent call last): File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_ssl.py, line 2596, in test_default_ecdh_curve context.set_ciphers(ECDH) ssl.SSLError: ('No cipher can be selected.',) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21015 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)
Serhiy Storchaka added the comment: Do you plan to backport bug fixes to 3.3 and 2.7? Which commit? A fix of _PyUnicode_TranslateCharmap(). 3.3 is no more open to bug fixes, only to security fixes. Oh, I meant 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)
STINNER Victor added the comment: A fix of _PyUnicode_TranslateCharmap(). Sorry, I don't see which commit is a bugfix and is not backported to Python 3.4 yet. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
New submission from Hrvoje Nikšić: On a Python compiled with Intel C compiler, float('nan') returns 0.0. This behavior can be reproduced with icc versions 11 and 12. The definition of Py_NAN in include/pymath.h expects `HUGE_VAL * 0.0` to compile to a NaN value on IEEE754 platforms: /* Py_NAN * A value that evaluates to a NaN. On IEEE 754 platforms INF*0 or * INF/INF works. Define Py_NO_NAN in pyconfig.h if your platform * doesn't support NaNs. */ #if !defined(Py_NAN) !defined(Py_NO_NAN) #define Py_NAN (Py_HUGE_VAL * 0.) #endif I don't have a copy of the standard, but a simple test shows that the above does not hold for icc. When compiled with icc without any flags, the following program outputs inf 0.00 instead of the expected inf nan: #include stdio.h #include math.h int main() { double inf = HUGE_VAL; double nan = HUGE_VAL * 0; printf(%f %f\n, inf, nan); return 0; } Compiling the same program with gcc yields the expected output of inf nan. This issue can be fixed (or worked around, if it's an icc bug) by using a different definition of Py_NAN. On icc, defining Py_NAN as `Py_HUGE_VAL / Py_HUGE_VAL` produces the intended effect. If this is considered suboptimal on other compilers, the definition can be conditionally compiled for icc only. The attached patch fixes the issue, taking the conservative approach of only modifying the icc definition of Py_NAN. -- components: Interpreter Core files: intel-nan.diff keywords: patch messages: 215687 nosy: hniksic priority: normal severity: normal status: open title: float('nan') returns 0.0 on Python compiled with icc type: behavior versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file34746/intel-nan.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs
Stefan Krah added the comment: FreeBSD 9 is failing as well: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6583/steps/test/logs/stdio -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21015 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Stefan Krah added the comment: Did you compile with -fp-model strict? IIRC icc is not IEEE-754 compliant by default. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Changes by Jurica Bradarić jbrada...@gmail.com: -- nosy: +jbradaric ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1814] Victor Stinner's GMP patch for longs
Hristo Venev added the comment: What about using PyVarObject of mp_limb_t and mpn instead of mpz_t? Addition: - Check signs and allocate. - Possibly compare absolute values. - Call mpn_(add|sub)_n and possibly mpn_(add|sub)_1 if the integers have different sizes. - Overhead for small integers: 1 Python-GMP, 1 if. Subtraction: - Same as addition Multiplication: - Check signs and allocate. - Call mpn_mul. - Overhead for small integers: 1 Python-GMP, 2 GMP-GMP, 3 if. Division: - Check signs and allocate. - Call mpn_div_q. - Overhead for small integers: 1 Python-GMP, 1 GMP-GMP, 1 if, maybe a 3 more ifs in mpn_divrem_1. Pow: - Create mpz_t values using MPZ_ROINIT_N(limbs, size) and call mpz_pow(m?). Copy from mpz_limbs_read(result). * The overhead is after checking if both arguments are integers until going to the right function (mpn_mul - mpn_mul_n - mpn_mul_basecase). Checks for adding integers 1(GMP_NUMB_BITS-1), multiplying 1(GMP_NUMB_BITS/2) and dividing 1GMP_NUMB_BITS can be added. -- nosy: +h.venev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1814 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1814] Victor Stinner's GMP patch for longs
STINNER Victor added the comment: What about using PyVarObject of mp_limb_t and mpn instead of mpz_t? FYI this issue is closed, it's not a good practice to comment closed issue (for example, the issue is hidden in the list of recent issues). If you want to learn more about my old patch, you should also read python-dev archives. Another major blocking point was the license: GMP is released under the GNU GPL license, which is incompatible with the Python License. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1814 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Mark Dickinson added the comment: What's `sys.float_repr_style` for this build? For Python 3.5 and short float repr, `float('nan')` shouldn't even be using Py_NAN. It should land in _Py_parse_inf_or_nan in pystrtod.c, which uses `_Py_dg_stdnan` to get the NaN value directly from a suitable bitpattern. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21164] print unicode in Windows console
STINNER Victor added the comment: Hi, when you say The console is the the old MS-DOS command (Windows console) opened when you run the cmd.exe program? Or IDLE or another console? For the Windows console, see the old issue #1602 which is not fixed yet. On Windows, sys.stdout.encoding is your OEM code page, which is usually different than the ANSI code page (locale.getpreferredencoding()). -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21164 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21168] unicodeobject.c: likely type-punning may break strict-aliasing rules
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/48/steps/compile/logs/stdio Objects/unicodeobject.c: In function '_PyUnicode_Init': Objects/unicodeobject.c:582: warning: likely type-punning may break strict-aliasing rules: object '*data' of main type 'unsigned int' is referenced at or around Objects/unicodeobject.c:582 and may be aliased to object 'linebreak' of main type 'short unsigned int' which is referenced at or around Objects/unicodeobject.c:14933. According to koobs, it's gcc 4.2.1 on this buildbot. -- messages: 215694 nosy: haypo priority: normal severity: normal status: open title: unicodeobject.c: likely type-punning may break strict-aliasing rules versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21168 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20035] Clean up Tcl library discovery in Tkinter on Windows
Serhiy Storchaka added the comment: TCL_VERSION should be set before call of Tcl_FindExecutable() (for correct Tcl encodings initialization). Tcl_FindExecutable() is called in PyInit__tkinter(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20035 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21168] unicodeobject.c: likely type-punning may break strict-aliasing rules
STINNER Victor added the comment: The warning comes from the make_bloom_mask() call below. make_bloom_mask() is called with kind=PyUnicode_2BYTE_KIND (Py_UCS2), whereas the gcc waring is about Py_UCS4. It looks like a false positive. static BLOOM_MASK bloom_linebreak = ~(BLOOM_MASK)0; ... Py_UCS2 linebreak[] = { ... }; /* initialize the linebreak bloom filter */ bloom_linebreak = make_bloom_mask( PyUnicode_2BYTE_KIND, linebreak, Py_ARRAY_LENGTH(linebreak)); -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21168 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21169] getpass.getpass() fails with non-ASCII characters in prompt
New submission from Arfrever Frehtes Taifersar Arahesis: getpass.getpass() fails with non-ASCII characters in prompt. The attached example scripts (for Python 2 and 3) contain non-ASCII unicode prompt (Polish hasło == English password) written in UTF-8. Python-2 version fails always. Python-3 version fails in non-UTF-8 locale. $ ./getpass_test_python2 Traceback (most recent call last): File ./getpass_test_python2, line 5, in module getpass.getpass(uHasło: ) File /usr/lib64/python2.7/getpass.py, line 71, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File /usr/lib64/python2.7/getpass.py, line 128, in _raw_input prompt = str(prompt) UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in position 3: ordinal not in range(128) $ LC_ALL=en_US.UTF-8 ./getpass_test_python3 Hasło: $ LC_ALL=C ./getpass_test_python3 Traceback (most recent call last): File ./getpass_test_python3, line 5, in module getpass.getpass(Has\u0142o: ) File /usr/lib64/python3.4/getpass.py, line 78, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File /usr/lib64/python3.4/getpass.py, line 138, in _raw_input stream.write(prompt) UnicodeEncodeError: 'ascii' codec can't encode character '\u0142' in position 3: ordinal not in range(128) $ -- components: Library (Lib) keywords: easy messages: 215697 nosy: Arfrever priority: normal severity: normal stage: needs patch status: open title: getpass.getpass() fails with non-ASCII characters in prompt versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21169 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21169] getpass.getpass() fails with non-ASCII characters in prompt
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Added file: http://bugs.python.org/file34747/getpass_test_python2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21169 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21169] getpass.getpass() fails with non-ASCII characters in prompt
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Added file: http://bugs.python.org/file34748/getpass_test_python3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21169 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Hrvoje Nikšić added the comment: sys.float_repr_style is 'short'. I haven't actually tried this in Python 3.5, but I did note the same definition of Py_NAN (which is used elsewhere in the code), so I tagged the issue as likely also present in 3.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21166] Bus error on AMD64 FreeBSD 9.x 3.4 buildbot
koobs added the comment: Uploading gdb output at Victors request -- nosy: +koobs Added file: http://bugs.python.org/file34749/gdb.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21166 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Hrvoje Nikšić added the comment: The compilation was performed with the default flags, i.e. without -fp-model strict or similar. If Python requires strict IEEE 754 floating-point, it should probably be mentioned at a prominent place in the documentation. Administrators building Python with alternative compilers or on non-gcc Unix systems might not be aware of the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21166] Bus error on AMD64 FreeBSD 9.x 3.4 buildbot
koobs added the comment: Interestingly, I note the following lines from the gdb log: #5 0x000801ae1e99 in PyModule_Create2 () from /usr/local/lib/libpython3.4m.so.1 #6 0x000801840de8 in PyInit__heapq () from /usr/local/lib/python3.4/lib-dynload/_heapq.so I had installed Python 3.4 just prior to Victor reporting the issue. If its at all relevant, Python 3.4 was built using clang (not gcc, which the buildbots use) Removing Python 3.4 from the system and rebuilding makes the issue go away. The question is, what is ./python from the buildbot build directory doing using, loading or otherwise interacting with the python installation on the system in the first place? Is a lack of isolation the root cause? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21166 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Mark Dickinson added the comment: I tagged the issue as likely also present in 3.x. So I believe that this particular issue (float('nan') giving zero) should not be present on Python 3.4 or above. The bogus definition of Py_NAN will still cause problems in some math and cmath return values, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Mark Dickinson added the comment: If Python requires strict IEEE 754 floating-point, It doesn't (at the moment). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21166] Bus error on AMD64 FreeBSD 9.x 3.4 buildbot
koobs added the comment: Clarification: a) I had just installed Python 3.4 (at the system level, via ports) a) Removing Python 3.4 from the system and (forcing a rebuild of the buildbot) makes the issue go away. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21166 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Changes by Mark Dickinson dicki...@gmail.com: -- versions: -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Hrvoje Nikšić added the comment: Mark: If Python requires strict IEEE 754 floating-point, It doesn't (at the moment). Does this imply that my patch is a better fix than requiring the builder to specify -fp-model strict to icc? For our use case either solution is valid. For administrators and users testing or using Python with icc, it might be more convenient for Py_NAN to do the right thing with the default icc flags. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Mark Dickinson added the comment: It doesn't (at the moment). Sorry; that was an unhelpful kneejerk reply. There are two aspects to this. (1) Currently, at least in theory, CPython doesn't require IEEE 754 *at all*: in theory, it should work with whatever floating-point format the platform's double type happens to provide. In practice I suspect there's a lot more IEEE 754 dependence in the codebase than we realize, and I'd expect to see a fair amount of test breaking if Python were ever to meet a non-IEEE 754 platform. (Reports of any *recent* occurrences of Python in the wild meeting non-IEEE 754 platforms would be welcomed.) (2) If CPython *does* figure out that it's running on an IEEE 754 platform then yes, care should be taken with compiler flags to ensure that we're not using compiler optimisations that have the potential to break IEEE semantics. Without this there's a significant danger of float to string conversions getting messed up; there are also a few odds and ends in the math and cmath libraries that depend on careful IEEE semantics. (The implementations of fsum and log1p, for example.) I think the right fix here is to add the relevant compiler flag to the build. That said, I'd *also* love to see remaining uses of Py_NAN fixed to use _Py_dg_stdnan where available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21167] float('nan') returns 0.0 on Python compiled with icc
Stefan Krah added the comment: I agree we should add -fp-model strict to the icc build flags, provided that there is a way that it does not show up in the distutils flags. Apparently icc users want unsafe fast math by default, so this flag should probably not be enforced in extension module builds. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1191964] asynchronous Subprocess
Giampaolo Rodola' added the comment: Some initial comments here: http://bugs.python.org/review/1191964/#msg1. Also, if I think about integrating this into an IO loop it seems natural to me to think about timeouts. How complicated would it be to do this? data = proc.read_nonblocking(timeout=0) data = proc.read_stderr_nonblocking(timeout=0) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1191964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1191964] asynchronous Subprocess
akira added the comment: Also, Richard Oudkerk's claims above about not needing to use fcntl to swap flags is not correct. It's necessary to not block on reading, even if select is used. Select just guarantees that there is at least 1 byte or a closed handle, not that your full read will complete. On Linux, `fcntl` is not necessary if you use `os.read(pipe, bufsize)` after `select` instead of `pipe.read(bufsize)`. `os.read` may just return less than `bufsize` bytes if they are not available. -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1191964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21170] Incorrect signature for unittest.TestResult.startTestRun(), .stopTestRun()
New submission from Volodymyr Sapsai: Steps to reproduce: 1. Open docs for unittest.TestResult class. 2. Look at startTestRun() and stopTestRun() methods signatures (https://docs.python.org/3.4/library/unittest.html#unittest.TestResult.startTestRun) Actual result: It is stated that aforementioned methods accept 1 argument 'test'. Expected result: These methods don't accept any arguments, it should be stated so in the docs. -- assignee: docs@python components: Documentation messages: 215710 nosy: Volodymyr.Sapsai, docs@python priority: normal severity: normal status: open title: Incorrect signature for unittest.TestResult.startTestRun(), .stopTestRun() versions: Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21170 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21168] unicodeobject.c: likely type-punning may break strict-aliasing rules
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21168 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1191964] asynchronous Subprocess
akira added the comment: Could `read_nonblocking()`, `write_nonblocking()` raise OSError(EAGAIN) (it could be named `ResourceTemporarilyUnavailableError`) if read/write would block? It would allow to distinguish EOF (permanent condition) from read/write would block (temporarily condition) without additional API calls. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1191964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Changes by Patrick Westerhoff patrickwesterh...@gmail.com: -- nosy: +poke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21171] Outdated usage str.encode('rot-13') in rot13 codec
New submission from Михаил Мишакин: Function rot13 in file encodings/rot_13.py throws exception: LookupError: 'rot-13' is not a text encoding; use codecs.encode() to handle arbitrary codecs -- messages: 215712 nosy: Pix priority: normal severity: normal status: open title: Outdated usage str.encode('rot-13') in rot13 codec type: enhancement versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21171 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21171] Outdated usage str.encode('rot-13') in rot13 codec
Changes by Михаил Мишакин pixzi...@gmail.com: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21171 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21172] Unexpected behaviour with logging.LogRecord first arg is dict case
New submission from Alan Briolat: The logging.LogRecord class is more restrictive with its first arg is dict case than the formatting operator it uses requires. As far as I can tell, for %(foo)s % bar, the minimum contract is that bar.__getitem__(foo) succeeds, not that bar is an instance of dict. However, fulfilling only this minimum contract results in LogRecord raising an exception at the point of applying the string format, which is confusing considering the same expression succeeds outside of logging. See the attached file for how 2 equivalent expressions behave completely differently. For resolution, I wonder if checking for hasattr(..., '__getitem__') instead of isinstance(..., dict) would be sufficient? -- components: Library (Lib) files: logging_format_bug.py messages: 215713 nosy: alan.briolat priority: normal severity: normal status: open title: Unexpected behaviour with logging.LogRecord first arg is dict case type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34750/logging_format_bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21172 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21172] Unexpected behaviour with logging.LogRecord first arg is dict case
Changes by Benjamin Peterson benja...@python.org: -- assignee: - vinay.sajip nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21172 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21139] Idle: change default reformat width from 70 to 72
Terry J. Reedy added the comment: Changing the default in the default configuration file is trivial. In test_formatparagraph.FormatEventTest, test_comment_block and test_long_line currently fail if the reformat width is changed on the General tab of the configuration dialog. These tests will need to be altered when the default is changed. Also, the tests should temporarily change the reformat width to the presumed default in the class setup and teardown methods. If this is not possible, the tests should be skipped if it is not what the test requires. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21139 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15968] Incorporate Tcl/Tk/Tix into the Windows build process
Terry J. Reedy added the comment: I reran external.bat in all three versions and compile runs better. Test_idle with -ugui fails to find _tkinter after another test that runs tk (including itself) *in the same process*. Adding -j2 to run in separate process eliminates the problem. F:\Python\dev\5\py35pcbuild\python_d -m test -j2 -ugui test_tcl test_idle So does not using test.test_support to run the tests. The following runs fine either at a command line or within Idle. (Does unittest run tests in a subprocess?) from test import support; support.use_resources = ['gui'] import unittest unittest.main('test.test_tcl', exit=False) unittest.main('test.test_idle', exit=False) -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15968 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21173] WeakKeyDictionary.__len__ fragile w/ _IterationGuards
New submission from Philip Jenvey: len() on WeakKeyDictionarys can fail with ValueErrors when _IterationGuards are kept alive Attached is a test showing this: == ERROR: test_weak_keys_len_destroy_while_iterating (__main__.MappingTestCase) -- Traceback (most recent call last): File Lib/test/test_weakref.py, line 1336, in test_weak_keys_len_destroy_while_iterating self.assertEqual(len(dict), 0) ValueError: __len__() should return = 0 One probably shouldn't keep them alive like this, but __len__ shouldn't be blowing up either. On non ref counting GC platforms this situation is easier to trigger unintentionally -- components: Library (Lib) messages: 215716 nosy: pitrou, pjenvey priority: normal severity: normal status: open title: WeakKeyDictionary.__len__ fragile w/ _IterationGuards type: behavior versions: Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21173 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21173] WeakKeyDictionary.__len__ fragile w/ _IterationGuards
Changes by Philip Jenvey pjen...@underboss.org: -- keywords: +patch Added file: http://bugs.python.org/file34751/issue21173-test.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21173 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21165] Optimize str.translate() for replacement with substrings and non-ASCII strings
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21165 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21174] A typo in the docs for exception GeneratorExit
New submission from Boštjan Mejak: The docs for the exception GeneratorExit starts like this: Raise when a generator‘s close() method is called. The sentece should start with the first word Raise to say Raised. You can find this particular doc sentence on this link: https://docs.python.org/2/library/exceptions.html#exceptions.GeneratorExit This is a small fix. Just add the letter d. -- assignee: docs@python components: Documentation messages: 215717 nosy: Zvezdoslovec, docs@python priority: normal severity: normal status: open title: A typo in the docs for exception GeneratorExit type: enhancement versions: Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21174 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21175] Refcounting error in str.translate fastpath
New submission from Josh Rosenberg: Py_None is not being properly decref-ed in the str.translate fast path. I've attached a simple patch that fixes this (also corrects some comments and types in the same function). No idea is Py_None ref leaks are considered a serious problem, but I figure it's better to be safe than sorry. -- files: fix_translate_none.patch keywords: patch messages: 215718 nosy: haypo, josh.rosenberg priority: normal severity: normal status: open title: Refcounting error in str.translate fastpath type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34752/fix_translate_none.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21175 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21175] Refcounting error in str.translate fastpath
Josh Rosenberg added the comment: For reference, bug introduced by fix for #21118. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21175 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21175] Refcounting error in str.translate fastpath
Josh Rosenberg added the comment: Also, just to be clear, I submitted the contributor form earlier this evening (using the online submission tool), so as soon as that propagates, it should be possible to accept my code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21175 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21174] A typo in the docs for exception GeneratorExit
Roundup Robot added the comment: New changeset aff368b58a98 by Benjamin Peterson in branch '2.7': fix verb (closes #21174) http://hg.python.org/cpython/rev/aff368b58a98 New changeset 33528b9520e6 by Benjamin Peterson in branch '3.4': fix verb (closes #21174) http://hg.python.org/cpython/rev/33528b9520e6 New changeset c48164710ed5 by Benjamin Peterson in branch 'default': merge 3.4 (#21174) http://hg.python.org/cpython/rev/c48164710ed5 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21174 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21175] Refcounting error in str.translate fastpath
Roundup Robot added the comment: New changeset fa6debebfe8b by Benjamin Peterson in branch 'default': fix reference leaks in the translate fast path (closes #21175) http://hg.python.org/cpython/rev/fa6debebfe8b -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21175 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1887] Document that distutils doesn't support out-of-source builds
Alba Magallanes added the comment: hi, here is a second version of the patch. Please review it. -- keywords: +patch Added file: http://bugs.python.org/file34753/bug1887_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
New submission from Alexander Belopolsky: [Nathaniel Smith at numpy-discussion] Guido just formally accepted PEP 465: https://mail.python.org/pipermail/python-dev/2014-April/133819.html http://legacy.python.org/dev/peps/pep-0465/#implementation-details Yay. The next step is to implement it, in CPython and in numpy. I have time to advise on this, but not to do it myself, so, any volunteers? Ever wanted to hack on the interpreter itself, with BDFL guarantee your patch will be accepted (if correct)? The todo list for CPython is here: http://legacy.python.org/dev/peps/pep-0465/#implementation-details There's one open question which is where the type slots should be added. I'd just add them to PyNumberMethods and then if someone objects during patch review it can be changed. -- assignee: belopolsky components: Interpreter Core messages: 215724 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Implement matrix multiplication operator (PEP 465) type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20035] Clean up Tcl library discovery in Tkinter on Windows
Zachary Ware added the comment: Serhiy Storchaka wrote: TCL_VERSION should be set before call of Tcl_FindExecutable() (for correct Tcl encodings initialization). Tcl_FindExecutable() is called in PyInit__tkinter(). I assume you mean TCL_LIBRARY (since TCL_VERSION is #defined in Tcl.h)? You are correct though, I missed that part of the comment at the top of tkinter._fix. However, I don't know what issues arise from not having TCL_LIBRARY set before Tcl_FindExecutable() (I haven't seen any problems, but I live in an ASCII world). Also, I have tried stepping through the Tcl_FindExecutable() call in PyInit__tkinter() with the VS debugger, and didn't see anything that looked like it was trying to read TCL_LIBRARY or hit the filesystem at all, which makes me suspect that it may not actually need TCL_LIBRARY prior to Tcl_FindExecutable(). Can you give me steps to reproduce problems with not having TCL_LIBRARY set that early? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20035 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: Here's a first patch. It works, but needs more tests (associativity, precedence, __rmatmul__, etc...) and also docs. I can work on that tomorrow. -- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file34754/mat-mult1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21059] idle_test.test_warning failure
Roundup Robot added the comment: New changeset c507da0b573f by Zachary Ware in branch 'default': Issue #21059: Temporary measure to make the Windows buildbots useful again. http://hg.python.org/cpython/rev/c507da0b573f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21059 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.
Josh Rosenberg added the comment: Any news on this? I was about to open a bug of my own for this, since the docs and code are still out of sync. -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.
Josh Rosenberg added the comment: As far as performance goes, presumably the length hinting API reduces the number of cases in which we're working with completely unsized iterables, right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: Here are changes to the operator module... -- Added file: http://bugs.python.org/file34755/mat-mult2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Alexander Belopolsky added the comment: I've got to the point where I can do import ast ast.dump(ast.parse('a @ b')) Module(body=[Expr(value=BinOp(left=Name(id='a', ctx=Load()), op=MatMult(), right=Name(id='b', ctx=Load(]) I'll post a link to my bitbucket clone shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21171] Outdated usage str.encode('rot-13') in rot13 codec
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21171 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: Here is a nearly complete patch... -- Added file: http://bugs.python.org/file34756/mat-mult3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21171] Outdated usage str.encode('rot-13') in rot13 codec
Berker Peksag added the comment: Here's a patch. I tested it with the following command: $ cat LICENSE | ./python -m encodings.rot_13 -- keywords: +patch nosy: +berker.peksag stage: - patch review type: enhancement - behavior Added file: http://bugs.python.org/file34757/issue21171.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21171 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Alexander Belopolsky added the comment: Wow! That was quick. And I am still fighting with bitbucket. Maybe I should stop duplicating the effort at this point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: On Mon, Apr 7, 2014, at 22:09, Alexander Belopolsky wrote: Alexander Belopolsky added the comment: Wow! That was quick. And I am still fighting with bitbucket. Maybe I should stop duplicating the effort at this point. Sorry about that. I only saw the first message, where Nathaniel invites an implementation. I didn't realize that was a direct quote from the mailing list (not by you) and didn't notice you also assigned it to yourself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Alexander Belopolsky added the comment: Thanks for stepping in. From a quick look at your patch I don't see anything that I would do much differently. I noticed some whitespace issues in Include/token.h: -#define AT 49 -#define RARROW 50 -#define ELLIPSIS51 +#define AT 49 +#define ATEQUAL50 +#define RARROW 51 +#define ELLIPSIS52 (Are you sure you want to re-enumerate RARROW and ELLIPSIS? Why not just give ATEQUAL the value of 52?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: On Mon, Apr 7, 2014, at 22:25, Alexander Belopolsky wrote: Alexander Belopolsky added the comment: + .. versionadded:: 3.4 Are you planning to use the time machine? :-) Good catch. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: On Mon, Apr 7, 2014, at 22:23, Alexander Belopolsky wrote: Alexander Belopolsky added the comment: Thanks for stepping in. From a quick look at your patch I don't see anything that I would do much differently. I noticed some whitespace issues in Include/token.h: -#define AT 49 -#define RARROW 50 -#define ELLIPSIS51 +#define AT 49 +#define ATEQUAL50 +#define RARROW 51 +#define ELLIPSIS52 (Are you sure you want to re-enumerate RARROW and ELLIPSIS? Why not just give ATEQUAL the value of 52?) I thought it would be nicer if ATEQUAL was right after AT. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Alexander Belopolsky added the comment: + .. versionadded:: 3.4 Are you planning to use the time machine? :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21176] Implement matrix multiplication operator (PEP 465)
Benjamin Peterson added the comment: Here's my latest and greatest version. I'll finish up after some sleep. -- Added file: http://bugs.python.org/file34758/mat-mult4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com