[issue9614] _pickle is not entirely 64-bit safe

2011-04-27 Thread Alexander Belopolsky
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

[issue9614] _pickle is not entirely 64-bit safe

2011-04-27 Thread Alexander Belopolsky
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

[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-27 Thread Alexander Belopolsky
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

[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Alexander Belopolsky
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

[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-04-28 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-04-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file21829/unorderable-nans.diff ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Pytho

[issue11949] Make float('nan') unorderable

2011-04-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file21828/unorderable-nans.diff ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Pytho

[issue11949] Make float('nan') unorderable

2011-04-28 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-04-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file21829/unorderable-nans.diff ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Pytho

[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-05-01 Thread Alexander Vrchoticky
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

[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-05-02 Thread Alexander Vrchoticky
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,

[issue11930] Remove time.accept2dyear

2011-05-02 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-05-03 Thread Alexander Belopolsky
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

[issue11986] Min/max not symmetric in presence of NaN

2011-05-03 Thread Alexander Belopolsky
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.

[issue11986] Min/max not symmetric in presence of NaN

2011-05-03 Thread Alexander Belopolsky
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') >>>

[issue11949] Make float('nan') unorderable

2011-05-04 Thread Alexander Belopolsky
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

[issue12006] strptime should implement %V or %u directive from libc

2011-05-05 Thread Alexander Belopolsky
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

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread Alexander Belopolsky
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

[issue11935] MMDF/MBOX mailbox need utime

2011-05-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue11935> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue665194] datetime-RFC2822 roundtripping

2011-05-05 Thread Alexander Belopolsky
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

[issue10581] Review and document string format accepted in numeric data type constructors

2011-05-08 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-05-16 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-05-16 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-05-16 Thread Alexander Belopolsky
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

[issue11986] Min/max not symmetric in presence of NaN

2011-05-16 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-05-21 Thread Alexander Belopolsky
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

[issue11986] Min/max not symmetric in presence of NaN

2011-05-21 Thread Alexander Belopolsky
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

[issue11949] Make float('nan') unorderable

2011-05-21 Thread Alexander Belopolsky
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

[issue11986] Min/max not symmetric in presence of NaN

2011-05-21 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue10446> ___ ___ Python-bugs-list mailing list Un

[issue7828] chr() and ord() documentation for wide characters

2010-11-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: d...@python -> belopolsky nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue7828> ___ ___ Python-

[issue9738] Document the encoding of functions bytes arguments of the C API

2010-11-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue9738> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: s/r86504 (3.1)/r86505 (3.1)/ -- ___ Python tracker <http://bugs.python.org/issue10446> ___ ___ Python-bugs-list mailin

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r86504 (3.2) and r86505 (3.1). -- ___ Python tracker <http://bugs.python.org/issue10446> ___ ___ Python-bug

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg121414 ___ Python tracker <http://bugs.python.org/issue10446> ___ ___ Python-bug

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg121412 ___ Python tracker <http://bugs.python.org/issue10446> ___ ___ Python-bug

[issue2001] Pydoc interactive browsing enhancement

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
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

[issue10446] pydoc3 links to 2.x library reference

2010-11-17 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg121440 ___ Python tracker <http://bugs.python.org/issue10446> ___ ___ Python-bug

[issue2001] Pydoc interactive browsing enhancement

2010-11-17 Thread Alexander Belopolsky
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

[issue2001] Pydoc interactive browsing enhancement

2010-11-17 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-17 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19632/issue4153.diff ___ Python tracker <http://bugs.python.org/issue4153> ___ ___ Python-bug

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19631/issue4153.diff ___ Python tracker <http://bugs.python.org/issue4153> ___ ___ Python-bug

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +akuchling ___ Python tracker <http://bugs.python.org/issue4153> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7828] chr() and ord() documentation for wide characters

2010-11-18 Thread Alexander Belopolsky
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

[issue7828] chr() and ord() documentation for wide characters

2010-11-18 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-18 Thread Alexander Belopolsky
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

[issue2001] Pydoc interactive browsing enhancement

2010-11-19 Thread Alexander Belopolsky
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

[issue2001] Pydoc interactive browsing enhancement

2010-11-19 Thread Alexander Belopolsky
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

[issue2001] Pydoc interactive browsing enhancement

2010-11-19 Thread Alexander Belopolsky
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

[issue4113] Add custom __repr__ to functools.partial

2010-11-19 Thread Alexander Belopolsky
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

[issue4153] Unicode HOWTO up to date?

2010-11-19 Thread Alexander Belopolsky
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

[issue10461] Use with statement throughout the docs

2010-11-19 Thread Alexander Belopolsky
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

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-11-19 Thread Alexander Belopolsky
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

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-11-19 Thread Alexander Belopolsky
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

[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2010-11-20 Thread Alexander Belopolsky
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.

[issue10371] Deprecate trace module undocumented API

2010-11-20 Thread Alexander Belopolsky
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

[issue10461] Use with statement throughout the docs

2010-11-20 Thread Alexander Belopolsky
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 >>

[issue10461] Use with statement throughout the docs

2010-11-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg121711 ___ Python tracker <http://bugs.python.org/issue10461> ___ ___ Python-bug

[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-11-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue1646068> ___ ___ Python-bugs-list mailing list Un

[issue9305] Don't use east/west of UTC in date/time documentation

2010-11-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: LGTM -- ___ Python tracker <http://bugs.python.org/issue9305> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9305] Don't use east/west of UTC in date/time documentation

2010-11-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: d...@python -> belopolsky stage: needs patch -> commit review ___ Python tracker <http://bugs.python.org/

[issue9305] Don't use east/west of UTC in date/time documentation

2010-11-20 Thread Alexander Belopolsky
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

[issue10474] range.count returns boolean

2010-11-20 Thread Alexander Belopolsky
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

[issue8646] PyUnicode_EncodeDecimal is undocumented

2010-11-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> duplicate status: open -> closed superseder: -> Document unicode C-API in reST ___ Python tracker <http://bugs.python.o

[issue8645] PyUnicode_AsEncodedObject is undocumented

2010-11-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> duplicate status: open -> closed superseder: -> Document unicode C-API in reST ___ Python tracker <http://bugs.python.o

[issue8647] PyUnicode_GetMax is undocumented

2010-11-20 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> duplicate superseder: -> Document unicode C-API in reST ___ Python tracker <http://bugs.python.org/

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Alexander Belopolsky
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

[issue10427] 24:00 Hour in DateTime

2010-11-21 Thread Alexander Belopolsky
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 >

[issue10493] test_strptime failures under OpenIndiana

2010-11-21 Thread Alexander Belopolsky
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,

[issue10494] Demo/comparisons/regextest.py needs some usage information.

2010-11-21 Thread Alexander Belopolsky
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

[issue8525] Small enhancement to help()

2010-11-21 Thread Alexander Belopolsky
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

[issue10138] calendar module does not support years outside [1, 9999] range

2010-11-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue10138> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10087] HTML calendar is broken

2010-11-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue10087> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10498] calendar.LocaleHTMLCalendar.formatyearpage() results in traceback with 'unsupported locale setting' on Windows

2010-11-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See also #10087. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue10498> ___ ___ Python-bugs-list m

[issue10497] Incorrect use of gettext in argparse

2010-11-21 Thread Alexander Belopolsky
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

[issue10138] calendar module does not support years outside [1, 9999] range

2010-11-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Fixed in revision 86669. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10087] HTML calendar is broken

2010-11-21 Thread Alexander Belopolsky
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

[issue10087] HTML calendar is broken

2010-11-22 Thread Alexander Belopolsky
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

[issue10087] HTML calendar is broken

2010-11-22 Thread Alexander Belopolsky
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

[issue10435] Document unicode C-API in reST

2010-11-22 Thread Alexander Belopolsky
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

[issue6878] changed return type from tkinter.Canvas.coords

2010-11-22 Thread Alexander Belopolsky
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

[issue6878] changed return type from tkinter.Canvas.coords

2010-11-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue10087] HTML calendar is broken

2010-11-22 Thread Alexander Belopolsky
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

[issue8525] Display exception's subclasses in help()

2010-11-22 Thread Alexander Belopolsky
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 |

[issue10499] Modular interpolation in configparser

2010-11-23 Thread Alexander Solovyov
Changes by Alexander Solovyov : -- nosy: +asolovyov ___ Python tracker <http://bugs.python.org/issue10499> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
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.

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
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

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Alexander Belopolsky
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

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