[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-10-23 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue9980] str(float) failure

2011-10-23 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as "won't fix", for reasons given above. -- resolution: -> wont fix status: open -> closed ___ Python tracker <http://b

[issue12965] longobject: documentation improvements

2011-10-23 Thread Mark Dickinson
Mark Dickinson added the comment: I've fixed some of the inaccurate comments in Objects/longobject.c, for the default branch; I'm still looking at the Doc update. This really is a bit of a mess, especially for cases like PyLong_AsVoidPtr, which can either end up calling PyLong_As

[issue12965] longobject: documentation improvements

2011-10-23 Thread Mark Dickinson
Mark Dickinson added the comment: > It could be fun to remove these conversions and see how much of the > test-suite fails. :-) ... On my machine, just test_ctypes and test_getargs2, as it turns out. -- ___ Python tracker <http://bugs.p

[issue8540] Make Context._clamp public in decimal module

2011-10-24 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 221638ba5d2a by Mark Dickinson in branch 'default': Issue #13248, issue #8540: Remove deprecated Context._clamp attribute from Decimal module. http://hg.python.org/cpython/rev/22

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- priority: normal -> critical stage: -> needs patch versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/i

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Patch looks good to me. -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue13343> ___ ___ Python-bug

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: I can't reproduce this: Python 2.7.2 |EPD 7.1-2 (32-bit)| (default, Jul 3 2011, 15:40:35) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "packages", "demo" or "enthought" for more information. >>> from random

[issue13340] list.index does not accept None as start or stop

2011-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: > What do you suggest? Doing it in _PyEval_SliceIndex() in 2.7 is > problematic, as we don't want x[None:2], right? :) Eh? Don't we already have this? Python 2.7.2 (default, Aug 22 2011, 13:53:27) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)

[issue13355] random.triangular error when low = mode

2011-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: > it would be convenient if low=high=mode returned low (or mode or high) Yes, I agree that random.triangular should degrade gracefully, in the same way that random.uniform does. -- ___ Python tracker &l

[issue13364] Duplicated Code

2011-11-06 Thread Mark Dickinson
Mark Dickinson added the comment: How would you suggest refactoring this? For that example, I'd prefer not to remove the repetition; as it is, the code is clean and clear. Eliminating the repetition would involve adding an extra layer of indirection, making the code in one of

[issue13364] Duplicated code in decimal module

2011-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry, I'm closing this as rejected. It might possibly have been better to write the code this way to begin with, but the code is already there, it's working, and there's little to be gained by 'fixing' it at this po

[issue11937] Interix support

2011-11-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue11937> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: Yep, there's an oddity here that's directly inherited from C's sprintf family of functions, namely that in %e-style formatting you give the number of digits after the point (= one less than the total number of significant digits), and in %g-s

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe a note describing that %g is different from the others in this regard? -1 from me; I don't really see that that would improve the documentation. Maybe that's just me, but I expect reference documentation to be clean, and uncluttered

[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info

2011-11-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12245> ___ ___ Python-bugs-list

[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer

2011-11-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> ___ Python tracker <http://bugs.python.org/issue7433> ___ ___ Python-bugs-list mailing list Un

[issue7049] decimal.py: Three argument power issues

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as won't fix. Even deprecation doesn't seem worth the effort here. -- resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.p

[issue2813] No float formatting in PyString_FromFormat

2011-11-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue2813> ___ ___ Python-bugs-list mailin

[issue9530] integer undefined behaviors

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: Status update: all the reported errors from the Objects/ directory have been fixed in the default branch (many of these were fixed recently as part of making sure that the test-suite runs under Clang's -ftrapv option), or are out of date. I haven'

[issue9530] integer undefined behaviors

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: See also issue #1621. -- ___ Python tracker <http://bugs.python.org/issue9530> ___ ___ Python-bugs-list mailing list Unsub

[issue9530] integer undefined behaviors

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: The issues reported for the datetime, array, itertools and math modules are also already fixed. That just leaves the following two of the reported issues outstanding: : Op: <<=, Reason : Signed Left Shift Error: Right operand is negative or is g

[issue1621] Do not assume signed integer overflow behavior

2011-11-19 Thread Mark Dickinson
Mark Dickinson added the comment: See also issue #9530. -- ___ Python tracker <http://bugs.python.org/issue1621> ___ ___ Python-bugs-list mailing list Unsub

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker <http://bugs.python.org/issue13433> ___ ___ Python-bugs-list mailin

[issue9530] integer undefined behaviors

2011-11-21 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd be happy to re-run the tests sometime. Yes, please! Alternatively, if there are easy instructions for us to re-run these tests, that would be valuable, too. Do I understand correctly that you have a publicly available extension to LLVM

[issue13245] sched.py kwargs addition and default time functions

2011-11-22 Thread Mark Dickinson
Mark Dickinson added the comment: +1 to kwargs support in sched. I've also ended up modifying sched.py to support this in the past. -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/is

[issue13494] 'cast' any value to a Boolean?

2011-11-28 Thread Mark Dickinson
New submission from Mark Dickinson : Docs nit: at http://docs.python.org/dev/library/stdtypes.html#boolean-values we have """ The built-in function bool() can be used to cast any value to a Boolean ... """ It's a little unusual to talk about casting in Py

[issue13496] bisect module: Overflow at index computation

2011-11-29 Thread Mark Dickinson
Mark Dickinson added the comment: Given that we typically need at least 4 bytes just for the PyObject * pointer for each item in a list, I guess real lists are safe. But how about list-like objects, implementing __len__ and __getitem__? The following appears to run forever on my machine

[issue7652] Merge C version of decimal into py3k.

2011-11-30 Thread Mark Dickinson
Mark Dickinson added the comment: > Does Python really need yet another multiprecision library? It's not really another library: it's a reimplementation of the existing decimal library in C. The decimal library is *hugely* valuable to the financial world, but its slowne

[issue9530] integer undefined behaviors

2011-12-02 Thread Mark Dickinson
Mark Dickinson added the comment: See also issue #13496. -- ___ Python tracker <http://bugs.python.org/issue9530> ___ ___ Python-bugs-list mailing list Unsub

[issue13522] Document error return values for PyFloat_* and PyComplex_*

2011-12-03 Thread Mark Dickinson
Mark Dickinson added the comment: Well, it's sort of documented implicitly: from http://docs.python.org/c-api/intro.html#exceptions "In general, when a function encounters an error, it sets an exception, discards any object references that it owns, and returns an error indicator

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue13535> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Mark Dickinson
Mark Dickinson added the comment: The 'self.bit_length() >= bits' condition for to_unsigned doesn't look right to me. E.g., if bits == 32, I'd expect the acceptable range of values to be range(-2**31, 2**31)---i.e., including -2**31, but excluding 2**31.

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-06 Thread Mark Dickinson
Mark Dickinson added the comment: On the feature request itself, I have to say that I'm unconvinced. Doing x % (2**32) seems good enough to me, in situations where you don't need the bounds checking. (And it's not clear to me that needing the bounds checks is the more c

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to optimized architecture-specific "hypot"

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue13534> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to optimized architecture-specific "hypot"

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: -Python 3.4 ___ Python tracker <http://bugs.python.org/issue13534> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to buggy architecture-specific "hypot"

2011-12-06 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report, and all the sleuthing. It's always good to see Python's test suite expose C library (or C compiler) bugs. :-) I propose closing this as 'won't fix': I certainly wouldn't want to add workarounds in the

[issue13534] test_cmath fails on ppc with glibc-2.14.90 due to buggy architecture-specific "hypot"

2011-12-06 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker <http://bugs.python.org/issue13534> ___ ___ Python-bugs-list mailing list Un

[issue13546] sys.setrecursionlimit() crashes IDLE

2011-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Style nit: how about 'except ValueError as e' instead of 'except ValueError, e' (Actually, why do we need e?) -- nosy: +mark.dickinson ___ Python tracker <http://bug

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Isn't the documentation that you refer to about *nested* list comprehensions, rather than list comprehensions with multiple 'for' clauses? E.g.,: [number for row in matrix for number in row] is not a nested list comprehension: it&

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Mind you, I'm not at all sure about that use of 'apprehension'... -- ___ Python tracker <http://bugs.pyt

[issue13573] csv.writer uses str() for floats instead of repr()

2011-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for fixing this. -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue13573> ___ ___ Python-bugs-list m

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: Agree with the -1s. -- ___ Python tracker <http://bugs.python.org/issue13603> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13610] On Python parsing numbers.

2011-12-16 Thread Mark Dickinson
Mark Dickinson added the comment: > Can this be fixed? Not without breaking backwards compatibility, I would think. -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issu

[issue13701] Remove Decimal Python 2.3 Compatibility

2012-01-03 Thread Mark Dickinson
Mark Dickinson added the comment: Did you have specific changes in mind? While we're still maintaining 2.x and 3.x code in parallel, there's a benefit to not having the versions of decimal.py diverge too much. Given that the 2.3-compatible code isn't actually broken, I&

[issue13755] str.endswith and str.startswith do not take lists of strings

2012-01-10 Thread Mark Dickinson
Mark Dickinson added the comment: No, but they take tuples: >>> 'abcd'.endswith(('a', 'b')) False >>> 'abcd'.endswith(('c', 'd')) True Suggest closing as out of date. -- nosy: +

[issue13703] Hash collision security issue

2012-01-11 Thread Mark Dickinson
Mark Dickinson added the comment: [Antoine] > Also, how about false positives? Having legitimate programs break > because of legitimate data would be a disaster. This worries me, too. [MAL] > Yes, which is why the patch should be disabled by default (using > an env var) in dot-re

[issue12080] decimal.py: performance in _power_exact

2011-05-22 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch. Stefan, could you please review? -- keywords: +patch Added file: http://bugs.python.org/file22068/issue12080.patch ___ Python tracker <http://bugs.python.org/is

[issue12080] decimal.py: performance in _power_exact

2011-05-22 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: -> commit review ___ Python tracker <http://bugs.python.org/issue12080> ___ ___ Python-bugs-list mailing list Unsubscri

[issue12080] decimal.py: performance in _power_exact

2011-05-22 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a slightly improved version that adds guards against computing 10**ye for large ye in the case y < 0, ye > 0. -- Added file: http://bugs.python.org/file22069/issue12080_v2.patch ___ Python tra

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-05-23 Thread Mark Dickinson
New submission from Mark Dickinson : In Python 2.6 and 2.7, str.translate accepts None as a first argument. That's documented in the docs, but not in the str.translate docstring. -- assignee: docs@python components: Documentation messages: 136720 nosy: docs@python, mark.dick

[issue12211] math.copysign must keep object type.

2011-06-04 Thread Mark Dickinson
Mark Dickinson added the comment: How about something like: "Return a float with the magnitude of x but the sign of y."? The behaviour of math.copysign with respect to non-float inputs matches that of almost all the other math module functions: integer arguments are first co

[issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other"

2011-06-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue12185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-06-04 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patches! Here's a slight expansion of the wording on your second patch: Return a copy of the string S, where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped th

[issue12127] Inconsistent leading zero treatment

2011-06-04 Thread Mark Dickinson
Mark Dickinson added the comment: Closing, based on feedback in the comments. Maybe one day... -- resolution: -> later status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info

2011-06-04 Thread Mark Dickinson
Mark Dickinson added the comment: float_info.rounds is a bit of an odd fish, and I think it was probably a mistake to include it in sys.float_info in the first place. All the other float_info fields relate to parameters of the floating-point format, which is fixed, useful information. In

[issue12232] embedded python import cmath

2011-06-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue12232> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info

2011-06-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +christian.heimes ___ Python tracker <http://bugs.python.org/issue12245> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info

2011-06-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: docs@python -> mark.dickinson ___ Python tracker <http://bugs.python.org/issue12245> ___ ___ Python-bugs-list mai

[issue12080] decimal.py: performance in _power_exact

2011-06-04 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed for 3.3 and 2.7. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12211] Better document math.copysign behavior.

2011-06-05 Thread Mark Dickinson
Mark Dickinson added the comment: > I think we should include the "On a platform ..." Sure, sounds good. One of the main things that makes copysign useful is that it distinguishes between -0.0 and 0.0. -- ___ Python t

[issue12232] embedded python import cmath

2011-06-06 Thread Mark Dickinson
Mark Dickinson added the comment: > Is it possible that the problem is related to floating point exceptions? Hmm. It's possible, but it's still a bit surprising that the crash occurs at import time rather than when calling one of the cmath functions. But it's very possi

[issue12232] embedded python import cmath

2011-06-06 Thread Mark Dickinson
Mark Dickinson added the comment: Looking at the cmath source, I'd be a bit suspicious that either the Py_NAN or the Py_HUGE_VAL macro (or both) is triggering an FPE. Both those values are used during module initialization. -- ___ Python tr

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: This is expected behaviour: Python 3 changed the semantics of the comparison operators <, <=, >, >=. See: http://docs.python.org/py3k/whatsnew/3.0.html#ordering-comparisons for more. -- nosy: +mark.dickinson resolution: -> inval

[issue12324] [3.2] sorted(big dict)

2011-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: > In this example, I'm sort by item number 1, which is a list, and its > first value is an int. ? You're sorting by the values of the dict d, and those values have the form [int, int, dict]; so when the two ints match (e.g., in your data

[issue12334] Strange sort error

2011-06-14 Thread Mark Dickinson
Mark Dickinson added the comment: ... and you probably want sorted(lst0, key=len, reverse=True) anyway. :-) -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue12

[issue12345] Add math.tau

2011-06-17 Thread Mark Dickinson
Mark Dickinson added the comment: Not to mention d(area of circle of radius r) = r dr matey. -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue12

[issue12164] str.translate docstring doesn't mention that 'table' can be None

2011-06-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12164> ___ ___ Pyth

[issue12381] refactor slice checks made by methods that take "slice like" arguments

2011-06-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue12381> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info

2011-06-25 Thread Mark Dickinson
Mark Dickinson added the comment: > all it does is give information about the FPU settings at the time that > Python was compiled Hmm. It's actually a bit better than that: as far as I can tell, it reflects the value of FLT_ROUNDS at the time that Python is started (when the sys

[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info

2011-06-25 Thread Mark Dickinson
Mark Dickinson added the comment: Patch that elaborates a bit on the meaning of sys.float_info.rounds. -- keywords: +patch Added file: http://bugs.python.org/file22454/issue12245.patch ___ Python tracker <http://bugs.python.org/issue12

[issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1

2011-06-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> ___ Python tracker <http://bugs.python.org/issue9990> ___ ___ Python-bugs-list mailing list Un

[issue10227] Improve performance of MemoryView slicing

2011-06-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: mark.dickinson -> ___ Python tracker <http://bugs.python.org/issue10227> ___ ___ Python-bugs-list mailing list Un

[issue12228] Stat doc - fix swap of UF_OPAQUE and UF_NOUNLINK description

2011-06-25 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch! -- nosy: +mark.dickinson resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12408] Relative import used on test_future5

2011-06-25 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. -- nosy: +mark.dickinson resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue7117] Backport py3k float repr to trunk

2011-06-29 Thread Mark Dickinson
Mark Dickinson added the comment: Hadn't seen that. Interesting! -- ___ Python tracker <http://bugs.python.org/issue7117> ___ ___ Python-bugs-list m

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-07-01 Thread Mark Dickinson
Mark Dickinson added the comment: [Amaury] "It would be interesting to see if it is better/faster than the current dtoa." I agree that it would be interesting to compare. [Eric] "maybe we can say we we can live with 99.5% shortest repr coverage" Please no! As you say,

[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-21 Thread Mark Dickinson
Mark Dickinson added the comment: The result of: struct.pack("d", float("inf")) would also be interesting. I'd expect to see: '\x7f\xf0\x00\x00\x00\x00\x00\x00' -- ___ Python tracker

[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-22 Thread Mark Dickinson
Mark Dickinson added the comment: The '1.06...e-314' number in the gdb output is interesting: it indicates a byte-ordering issue, though maybe that issue is only pertinent to gdb itself. On a little-endian machine: >>> struct.pack('>> struct.pack('

[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-22 Thread Mark Dickinson
Mark Dickinson added the comment: Question: does this test also fail after configuring with the --with-pydebug flag? (Which I *think* should turn compiler optimizations off, amongst other things.) -- ___ Python tracker <http://bugs.python.

[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2011-08-11 Thread Mark Dickinson
Mark Dickinson added the comment: If there's dependence on undefined behaviour (from overflow of signed integer operations) in intobject.c, I'd call that a bug. I've been trying to remove similar overflow checks from the Python source when I've encountered them, but th

[issue12831] 2to3 and integer division

2011-08-25 Thread Mark Dickinson
Mark Dickinson added the comment: > "/ 2" is an integer division, so it should be "// 3" in Python 3. No, I don't think that's right: 2to3 has no way of knowing that the programmer intended an integer division here (self.maxstars could be a float). Inste

[issue12831] 2to3 and integer division

2011-08-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue12754] Add alternative random number generators

2011-08-28 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue12754> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12889] struct.pack('d'... problem

2011-09-03 Thread Mark Dickinson
Mark Dickinson added the comment: I agree with you on the correct 8 output bytes. And those expected bytes are exactly what struct.pack is producing here: Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:40:35) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "packages&qu

[issue12889] struct.pack('d'... problem

2011-09-03 Thread Mark Dickinson
Mark Dickinson added the comment: > with codes 0x3f and 0x63 respectively Whoops: that should be '... 0x3f and 0x6e ...'. -- ___ Python tracker <http://bugs.pytho

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-06 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for turning these into TypeErrors. It makes little sense that PyLong_AsLongLong and PyLong_AsUnsignedLongLong behave differently here. Do you have a patch handy? -- ___ Python tracker <http://bugs.python.

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-06 Thread Mark Dickinson
Mark Dickinson added the comment: > This probably shouldn't be backported to 3.2 Agreed; I don't see this as a bugfix (especially since AFAIK it's not documented that TypeError should be raised here); rather, as a design improvement. > Also, it's worth noti

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-06 Thread Mark Dickinson
Mark Dickinson added the comment: The patch still needs tests (e.g., in test_capi). I'm not sure whether it would be good to add information about the TypeError to the docs. -- ___ Python tracker <http://bugs.python.org/is

[issue12909] Inconsistent exception usage in PyLong_As* C functions

2011-09-07 Thread Mark Dickinson
Mark Dickinson added the comment: Looks good to me. I'd prefer 'test_long_as_size' to be called 'test_long_as_size_t' (even though that's inaccurate for the ssize_t bits :-). The 'Py_None' reference counting in test_long_as_size and test_long_as_dou

[issue12941] add random.pop()

2011-09-09 Thread Mark Dickinson
Mark Dickinson added the comment: > is it really worth adding? Probably not. For improvements along these lines, I'd rather see random.choice support sets: >>> random.choice({1, 2}) Traceback (most recent call last): File "", line 1, in File "/Lib

[issue11457] Expose nanosecond precision from system calls

2011-09-10 Thread Mark Dickinson
Mark Dickinson added the comment: [about adding float128] > I realize a new float type would be a major undertaking That's an understatement and a half. The only way this could ever be viable is if float128 support becomes widespread enough that we don't have to write our own a

[issue8457] buildbot: test_asynchat and test_smtplib failures on Tiger: [Errno 9] Bad file descriptor

2010-08-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Ned! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue8457> ___ ___

[issue7037] test_asynchat fails on os x 10.6

2010-08-11 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue7037> ___ ___ Python-bugs-list

[issue9574] complex does not parse strings containing decimals

2010-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: The problem here is the spaces in the input string: newton:~ dickinsm$ python2.7 Python 2.7 (r27:82500, Jul 13 2010, 14:10:05) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license

[issue9574] complex does not parse strings containing decimals

2010-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: Note also that spaces are already allowed immediately inside the parentheses in a string argument to the complex constructor (in python 2.6 and later): >>> complex("( 1.1+2.1j )") (1.1001+

[issue9574] complex does not parse strings containing decimals

2010-08-12 Thread Mark Dickinson
Changes by Mark Dickinson : -- stage: -> needs patch versions: +Python 3.2 -Python 2.5, Python 2.6, Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/iss

[issue9574] complex does not parse strings containing decimals

2010-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: I'm wondering whether the moratorium (PEP 3003) applies to this; from a close reading I'd say it does. At any rate, it seems like an inessential enhancement, so I'd be happy to delay this until 3.3. -- versions: +Python

[issue9574] complex does not parse strings containing decimals

2010-08-12 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think determining *which* whitespace is allowed is a problem; just use whatever's already being used for the whitespace that's already allowed (around the whole complex input, for example, or between the optional parentheses and the n

[issue8433] buildbot: test_curses failure, getmouse() returned ERR

2010-08-13 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in 2.6 in r83970 (3.1 and 2.7 were fixed in revisions r83781, r83782). -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

<    1   2   3   4   5   6   7   8   9   10   >