Alexander Belopolsky added the comment:
On Wed, Apr 27, 2011 at 4:31 AM, Amaury Forgeot d'Arc
wrote:
>.. 027f81579b4a changed Pdata into a PyVarObject, and the "int length" member
> is now accessed with the Py_SIZE() macro.
ISTM that with this change Pdata struct is now i
Alexander Belopolsky added the comment:
I believe attached issue9614.diff should fix the warnings, but I don't have a
box to test this on.
--
Added file: http://bugs.python.org/file21800/issue9614.diff
___
Python tracker
<http://bugs.py
Alexander Belopolsky added the comment:
> I think it is presently a bug that a list containing
> a NaN value compares equal to itself.
Moreover, it also compares equal to another list containing the same NaN:
>>> [nan] is [nan]
False
>>> [nan] == [nan]
True
He
Alexander Belopolsky added the comment:
On Thu, Apr 28, 2011 at 3:01 AM, Nick Coghlan wrote:
..
> The status quo works.
No it does not. I am yet to see a Python program that uses
non-reflexivity of NaN in a meaningful way. What I've seen was either
programmers ignore it and write
Alexander Belopolsky added the comment:
On Thu, Apr 28, 2011 at 3:26 AM, Nick Coghlan wrote:
..
> 1. Write fully conformant implementations of IEEE754 floating point types,
> including the non-reflexive NaN comparisons
> (keeping in mind that, as a value-based specification, "sa
New submission from Alexander Belopolsky :
Rationale:
"""
IEEE 754 assigns values to all relational expressions involving NaN.
In the syntax of C, the predicate x != y is True but all others, x <
y , x <= y , x == y , x >= y and x > y, are False whenever x or y or
bot
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file21829/unorderable-nans.diff
___
Python tracker
<http://bugs.python.org/issue11949>
___
___
Pytho
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file21828/unorderable-nans.diff
___
Python tracker
<http://bugs.python.org/issue11949>
___
___
Pytho
Alexander Belopolsky added the comment:
Actually, my first attempt to fix the test was faulty. The correct logic seems
to be
+def is_negative_zero(x):
+return x == 0 and math.copysign(1, x) < 0
+
+def almost_equal(value, expected):
+if math.isfinite(expected) and math.isfinite(va
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file21829/unorderable-nans.diff
___
Python tracker
<http://bugs.python.org/issue11949>
___
___
Pytho
Alexander Vrchoticky added the comment:
I hit that problem too (Python 2.6.5). We have a Windows service application
(daemon, in Unix parlance). This is written in Python and uses
RotatingFileHandler to rotate files when they exceed 1MB. We look at the files
for debugging. For a live view of
Alexander Vrchoticky added the comment:
Thank you for the reply. I'll look into subclassing, but I am not convinced
that there is a way to fix this: The basic problem is that one viewer has a
file open, and the logger would like to start a new file with the same name.
What would work,
Changes by Alexander Belopolsky :
--
components: +Extension Modules, Library (Lib)
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Alexander Belopolsky added the comment:
> There are lots of almost-equality tests in the test-suite already,
> between test_math, test_float, test_cmath and test_complex.
> Do you need to implement another one here, or can you reuse one
> of the existing ones?
I can probably u
New submission from Alexander Belopolsky :
>>> nan = float('nan')
>>> min(nan, 5)
nan
>>> min(5, nan)
5
Good arguments can be made in favor of either result, but different value for
min(x, y) depending on the order of arguments can hardly be justified.
Alexander Belopolsky added the comment:
On Tue, May 3, 2011 at 2:41 PM, Raymond Hettinger
wrote:
..
> Undefined ordering means just that.
Means what? Compare float behavior to
Decimal('1')
>>> Decimal(1).max(Decimal('nan'))
Decimal('1')
>>>
Alexander Belopolsky added the comment:
On Tue, May 3, 2011 at 12:05 PM, Mark Dickinson wrote:
..
> I was thinking of something like the rAssertAlmostEqual method in test_cmath.
This one is good. I wonder if it would be appropriate to move
rAssertAlmostEqual() up to unitetest.case possi
Alexander Belopolsky added the comment:
This is a reasonable request and easy to implement. I am not sure how often
this functionality is needed, so I am only +0 on this feature.
--
keywords: +easy
stage: -> needs patch
versions: +Python
Alexander Belopolsky added the comment:
Rather than shoehorning datetime class support into existing functions, I think
a separate set of functions should be written to convert between RFC 2822
timestamps and datetime instances. Currently, email.utils has three functions
dealing with date
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue11935>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
On Thu, May 5, 2011 at 12:44 PM, R. David Murray wrote:
..
> Do you think we can get 9527 in?
I hope we can. Pure Python implementation can be improved by deducing
the TZ offset from localtime() and gmtime() calls. In C we can use
additional struct
Alexander Belopolsky added the comment:
On Sat, May 7, 2011 at 11:25 AM, Éric Araujo wrote:
> .. On one hand, I tend to agree that mixing Hindi/Arab numerals with Bengali
> does not make sense;
> on the other hand, rejecting it means that the int code does know about
> Unicod
Alexander Belopolsky added the comment:
On Sat, May 14, 2011 at 2:50 PM, Mark Dickinson wrote:
..
> On the issue itself, I'm -1 on making comparisons with float('nan') raise: I
> don't see that there's a real problem here that needs solving.
>
I probably sho
Alexander Belopolsky added the comment:
On Sat, May 14, 2011 at 3:08 PM, Raymond Hettinger
wrote:
..
>> Note that the current behaviour does *not* violate IEEE 754, ...
>
> I agree with Mark.
Do we really need a popular vote to determine what a published
standard does or does
Alexander Belopolsky added the comment:
A tracker bug has mangled the following paragraph following the IEEE 754
standard quote in my previous post:
"""
Table 5.2 referenced above lists 10 operations, four of which (>, <,
>=, and <=) are given spellings that are id
Alexander Belopolsky added the comment:
rhettinger> Your other tracker item correctly focused on the behavior of
rhettinger> float('NaN') itself,
You closed issue11949 as well, so it won't help. I disagree that this issue
would be resolved by resolving issue11949. Def
Alexander Belopolsky added the comment:
On Sat, May 21, 2011 at 3:18 PM, Mark Dickinson wrote:
>
> Mark Dickinson added the comment:
>
>> Table 5.2 referenced above lists 10 operations, four of which (>, <,
>> >=, and <=) are given spellings that are identi
Alexander Belopolsky added the comment:
On Sat, May 21, 2011 at 3:22 PM, Mark Dickinson wrote:
>
> Mark Dickinson added the comment:
>
>> Prof. Kahan states that nan < x must signal.
>
> Would that be the sentence that starts "In the syntax of C ..." ?
This
Alexander Belopolsky added the comment:
On Sat, May 21, 2011 at 3:50 PM, Mark Dickinson wrote:
..
> On the idea of a warning, I don't really see the point; I find it hard to
> imagine it's really going to catch many real errors.
My experience is different. In my work, NaNs
Alexander Belopolsky added the comment:
On Sat, May 21, 2011 at 3:32 PM, Mark Dickinson wrote:
..
> That might be viable (a math module function might also make sense here),
> though it feels a bit YAGNI to me.
I have to admit that it would be YAGNI for most of my code because it
uses
Alexander Belopolsky added the comment:
The attached patch, issue10446.diff, makes help(sys) look as follows:
NAME
sys
MODULE REFERENCE
http://docs.python.org/release/3.2/library/sys
The following documentation is automatically generated from the Python
source
files
Changes by Alexander Belopolsky :
--
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
assignee: d...@python -> belopolsky
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue7828>
___
___
Python-
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9738>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
On Wed, Nov 17, 2010 at 7:28 PM, Éric Araujo wrote:
>
> Éric Araujo added the comment:
>
> Looks good. Some remarks:
>
> 1) I assume you have checked that this code does not produce two newlines
> (one in the string,
> one fr
Alexander Belopolsky added the comment:
Committed in r86504 (3.2) and r86504 (3.1).
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Alexander Belopolsky added the comment:
s/r86504 (3.1)/r86505 (3.1)/
--
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
Committed in r86504 (3.2) and r86505 (3.1).
--
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bug
Changes by Alexander Belopolsky :
--
Removed message: http://bugs.python.org/msg121414
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bug
Changes by Alexander Belopolsky :
--
Removed message: http://bugs.python.org/msg121412
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bug
Alexander Belopolsky added the comment:
Ron,
I added a header to the text documentation clarifying that pydoc-generated
documentation is not authoritative. See issue 10446. I did add it to the HTML
page because it was not obvious where to put it and I knew that you are
changing layout
Alexander Belopolsky added the comment:
Reopening to consider changing just the link (not other changes) in 2.7. At
some point http://docs.python.org/library will point to 3.x and we get a bug in
2.7.
--
status: closed -> open
versions: +Python 2.7 -Python 3.1, Python
Alexander Belopolsky added the comment:
On Wed, Nov 17, 2010 at 11:26 PM, Éric Araujo wrote:
..
>> If there was say latest/X.Y, I would use that. Wait -
>> there is: docs.python.org/X.Y. Would you prefer that?
> My point was that people used 2.7 docs even when developing for
Alexander Belopolsky added the comment:
On Wed, Nov 17, 2010 at 11:21 PM, Ron Adam wrote:
..
> I noticed in your patch, the disclaimer only prints when pydoc can find a doc
> location (docloc is not None).
This is not a disclaimer, but an explanation of the relationship
between pydoc
Alexander Belopolsky added the comment:
On Wed, Nov 17, 2010 at 11:21 PM, Ron Adam wrote:
..
> I noticed in your patch, the disclaimer only prints when pydoc can find a doc
> location (docloc is not None).
This is not a disclaimer, but an explanation of the relationship
between pydoc
Changes by Alexander Belopolsky :
--
Removed message: http://bugs.python.org/msg121440
___
Python tracker
<http://bugs.python.org/issue10446>
___
___
Python-bug
Alexander Belopolsky added the comment:
I am attaching pydoc.png screenshot that shows how the new navigation bar is
rendered in my browser. It looks a little bit busy and I don't like
(get)/(search) buttons jumping below the text boxes when the browser window is
is not wide e
Alexander Belopolsky added the comment:
Shouldn't tests for new features added to Lib/test/test_pydoc.py?
--
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
Reopening because it looks like the fix was reverted in r82301.
"""
This HOWTO discusses Python 2.x’s support for Unicode, and explains various
problems that people commonly encounter when trying to work with Unicode. (This
HOWTO h
Alexander Belopolsky added the comment:
The changes added in r82301 are misleading because code examples in this HOWTO
have been converted to 3.x. I am attaching a patch that removes "has not yet
been updated to cover the 3.x" warning and makes some minor stylistic changes.
I h
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file19632/issue4153.diff
___
Python tracker
<http://bugs.python.org/issue4153>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file19631/issue4153.diff
___
Python tracker
<http://bugs.python.org/issue4153>
___
___
Python-bug
Alexander Belopolsky added the comment:
r82301 appears to be a blind merge of r82120 from the trunk. It is fairly
obvious that it was not intentional.
--
___
Python tracker
<http://bugs.python.org/issue4
Changes by Alexander Belopolsky :
--
nosy: +akuchling
___
Python tracker
<http://bugs.python.org/issue4153>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file19633/issue7828.diff
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
Committed in r86526 (3.2) and r86527 (3.1).
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
On Thu, Nov 18, 2010 at 2:41 PM, Terry J. Reedy wrote:
..
> I visually parse 0-1,114,111 as 0-1, 114, 111. So I think either the commas
> should be removed or extra spaces are needed: 0-1114111 or 0 - 1,114,111.
What about "0 through 1,114,1
Alexander Belopolsky added the comment:
On Thu, Nov 18, 2010 at 3:00 PM, Alexander Belopolsky
wrote:
..
>> I really think of them as hex or hexadecimal digits, just as 0-9 are
>> decimal, not base 10 digits.
>>
>
> I am fine with "hexadecimal" here. I did n
Alexander Belopolsky added the comment:
On Thu, Nov 18, 2010 at 2:37 AM, Ron Adam wrote:
..
> I'll try reading and writing directly to the socket and working up some tests
> from that.
> I don't suppose there's something like that already in the test suite I can
&g
Alexander Belopolsky added the comment:
issue2001_b.diff patch includes changes to urllib. Is this intentional? Is it
a bug fix, a feature? There is no mention in the NEWS file. If these changes
are needed for pydoc enhancements, I would like to separate them in its own
issue and commit
Alexander Belopolsky added the comment:
issue2001_c.diff is the same as issue2001_b.diff, but without urlparse changes
and with minor modifications to pydoc.rst resolving a conflict with a recent
commit. I have also uploaded the same patch to rietveld:
http://codereview.appspot.com/3187042
Alexander Belopolsky added the comment:
There is an ongoing discussion about deprecating undocumented
PyUnicode_AppendAndDel(). See Marc-Andre's comment in msg121371:
"""
+.. c:function:: void PyUnicode_Append(PyObject **pleft, PyObject *right)
+
+ Concat two strings a
Alexander Belopolsky added the comment:
Committed in revision 86530. Thanks Terry and Raymond for your comments. I
would like to keep this issue open (at a low priority) because the question in
the titles is still relevant. There are many new 3.x features that are not
covered such as
Alexander Belopolsky added the comment:
+1
BTW, I've updated examples in Unicode HOWTO to use with.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/is
Alexander Belopolsky added the comment:
I don't understand Victor's argument in msg115889. According to UTF-8 RFC,
<http://www.ietf.org/rfc/rfc2279.txt>:
- US-ASCII values do not appear otherwise in a UTF-8 encoded
character stream. This provides compatibility w
Alexander Belopolsky added the comment:
On Fri, Nov 19, 2010 at 3:06 PM, STINNER Victor wrote:
> .. Whereas PyUnicode_FromFormatV() converts the format string
> (bytes) to unicode (characters). If you would like a comparaison in C, it's
> like printf()+mbstowcs() in the same func
Alexander Belopolsky added the comment:
On Fri, Nov 19, 2010 at 7:15 PM, STINNER Victor wrote:
..
>
> Why should we do that? ASCII format is just fine. Remember that
> PyUnicode_FromFormatV() is part of the C API. I don't think that anyone would
> use non-ASCII format in C.
Alexander Belopolsky added the comment:
Committed in revision 86594.
--
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Alexander Belopolsky added the comment:
FWIW, I find the "with" variant much easier to read than
>>> words = re.findall('\w+', open('hamlet.txt').read().lower())
Too many operations in one line. It would be even better with
>>
Changes by Alexander Belopolsky :
--
Removed message: http://bugs.python.org/msg121711
___
Python tracker
<http://bugs.python.org/issue10461>
___
___
Python-bug
Changes by Alexander Belopolsky :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue1646068>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue9305>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
assignee: d...@python -> belopolsky
stage: needs patch -> commit review
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
On the second reading, I have a few issues with the patch.
1. Please run makepatcheck. There are whitespace issues in datetime.rst.
2. In docstrings, you remove the information about the sign. I would not mind
leaving docstrings the way they are
Alexander Belopolsky added the comment:
SilentGhost,
Benjamin's fix only affect the optimized path when the argument is int or bool.
Exotic comparison rules are handled in the else clause.
--
nosy: +belopolsky
___
Python tracker
Changes by Alexander Belopolsky :
--
resolution: -> duplicate
status: open -> closed
superseder: -> Document unicode C-API in reST
___
Python tracker
<http://bugs.python.o
Changes by Alexander Belopolsky :
--
resolution: -> duplicate
status: open -> closed
superseder: -> Document unicode C-API in reST
___
Python tracker
<http://bugs.python.o
Changes by Alexander Belopolsky :
--
resolution: -> duplicate
superseder: -> Document unicode C-API in reST
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
On Sun, Nov 21, 2010 at 1:24 PM, Rodrigo Bernardo Pimentel
wrote:
..
> I was writing tests for this issue, when something struck me: ok,
> datetime(year, month, day, 24) is valid.
> But is datetime(year, month, day, 24, 1) valid? Or datetime(ye
Alexander Belopolsky added the comment:
On Sun, Nov 21, 2010 at 3:48 PM, Mark Dickinson wrote:
..
> Well, if all that's wanted is for hour==24 to be legal on input, with the
> datetime object
> itself being automatically normalized at creation time, then the choices seem
>
Alexander Belopolsky added the comment:
AssertionError: strftime does not support standard '%d' format (day of month as
number (00-31))
Sounds pretty self-explainatory. I kind of doubt, however, that OpenIndiana's
strftime is that broken. Jesús,
Alexander Belopolsky added the comment:
+0
Not "+1" because Georg suggested that this demo be removed. See
http://mail.python.org/pipermail/python-ideas/2010-October/008416.html
On the patch, I would define a "usage" variable near the top of the program
instead of repe
Alexander Belopolsky added the comment:
The following passes tests in elp_8525.patch, but is much simpler:
===
--- Lib/pydoc.py(revision 86600)
+++ Lib/pydoc.py(working copy)
@@ -1139,6 +1139,15
Changes by Alexander Belopolsky :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10138>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue10087>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
See also #10087.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue10498>
___
___
Python-bugs-list m
Alexander Belopolsky added the comment:
The patch makes sense. I wonder if i10n of programs using argparse should be
mentioned in docs. Providing a sample translation file somewhere may not be a
bad idea at least for testing.
--
nosy: +belopolsky
Alexander Belopolsky added the comment:
Fixed in revision 86669.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Alexander Belopolsky added the comment:
It may be acceptable, but your patch elides the line breaks in output. Can you
add unit tests?
--
___
Python tracker
<http://bugs.python.org/issue10
Alexander Belopolsky added the comment:
On Mon, Nov 22, 2010 at 9:48 AM, Chris Lambacher wrote:
..
> I don't understand what you mean by "elides the line breaks in output".
It is actually not that bad:
$ ./python.exe -m calendar -t html| wc -l
121
$ python2.7 -m calen
Alexander Belopolsky added the comment:
On Mon, Nov 22, 2010 at 11:55 AM, Chris Lambacher
wrote:
..
> 1. Any suggestions about how to test the output of the console program (the
> case that this bug affects)
> would be appreciated.
For month displays, a doctest may be most appropr
Alexander Belopolsky added the comment:
On Wed, Nov 17, 2010 at 5:20 PM, Marc-Andre Lemburg
wrote:
..
> -/* Encodes a Unicode object and returns the result as Python string
> +/* Encodes a Unicode object and returns the result as Python bytes
> object. */
>
>
> PyUnico
Alexander Belopolsky added the comment:
Committed in r86697 (3.2) and r86698 (3.1).
@Éric: I tried to minimize whitespace changes in the commit, but if you see
indentation that can be improved, let me know and I'll fix it separately.
@SilentGhost: Yes, the problem is real. For ex
Changes by Alexander Belopolsky :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
I wonder: do we really need "encoding" option to the calendar output? It is
really not the job of the calendar module to deal with encodings. The calendar
module should produce text calendars as unicode strings and HTML calendars as
UTF-8
Alexander Belopolsky added the comment:
The proposal is to display builtin subclasses as for example:
>>> help(ArithmeticError)
class ArithmeticError(Exception)
| Base class for arithmetic errors.
|
| Method resolution order:
| ArithmeticError
|
Changes by Alexander Solovyov :
--
nosy: +asolovyov
___
Python tracker
<http://bugs.python.org/issue10499>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
>>> 'xyz'.center(20, '\U00100140')
Traceback (most recent call last):
File "", line 1, in
TypeError: The fill character must be exactly one character long
str.ljust and str.rjust are similarly affected.
Alexander Belopolsky added the comment:
On Wed, Nov 24, 2010 at 10:33 AM, Antoine Pitrou wrote:
..
> The question is, what should it do with such an input?
I think the rule for such functions should be that if
input.encode('utf-8') is the same on wide and narrow builds, then the
Alexander Belopolsky added the comment:
On Wed, Nov 24, 2010 at 3:37 PM, Marc-Andre Lemburg
wrote:
..
> I don't think we should change that for the formatting methods.
That's a reasonable position. What about
'Lo'
>>> '\N{OLD ITALIC LETTER A}'.is
501 - 600 of 4095 matches
Mail list logo