Alexander Belopolsky added the comment:
> Please leave the deployed code for named tuple as-is. Doctest may
> have issues with trailing whitespace, but that is doctest's problem,
> not named tuple's.
I am curious, what was the reason to add trailing whitespace in the na
Alexander Belopolsky added the comment:
Looks good to me as well. Just a nit-pick: in python code base "sizeof" is not
separated from the opening parenthesis. I understand the desire to distinguish
"sizeof" from a function, but it is probably better to be consistent.
Changes by Alexander Belopolsky :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue9909>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
The SystemExit vs. SystemError is clearly a typo in the doc. The VC comment
accompanying the addition of that note says "note that Py_Main doesnt return on
SystemExit." See [e5d8f0c0d634] and #5227.
--
nosy: +
Alexander Belopolsky added the comment:
The updated doc patch is missing :exc: markup on one of "SystemExit"s.
--
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
On Thu, Mar 31, 2011 at 2:52 PM, Ka-Ping Yee wrote:
..
> I am extremely disappointed by what has happened here.
>
What exactly are you disappointed about? As far as I can tell, the
feature request has not been rejected, just no one has come up
Alexander Belopolsky added the comment:
On Mon, Apr 4, 2011 at 5:42 PM, Jay Taylor wrote:
..
> I couldn't agree more with ping's position on this.
Adding votes to a tracker issue without a working patch will not move
it any further. There are several committers besides me in
Alexander Belopolsky added the comment:
On Tue, Apr 5, 2011 at 4:33 AM, Marc-Andre Lemburg
wrote:
..
> mxDateTime, which in large parts inspired the Python datetime module,
> has had a .ticks() method (for local time) and a .gmticks() method
> (for UTC) for more than a decade
Alexander Belopolsky added the comment:
MAL> Since most of the datetime module was inspired by mxDateTime,
MAL> I wonder why [ticks()/gmticks()] were left out. (msg75411)
"""
The datetime module intended to be an island of relative sanity.
Because the range of dates "
Alexander Belopolsky added the comment:
> What happens is the second value is negated (__neg__)
> which causes it to become less than timedelta.min and
> that is causing OverflowError.
Yes, and running the test case without C acceleration makes this obvious:
>>> import s
Alexander Belopolsky added the comment:
Let me state my position on this issue once again. Converting datetime values
to float is easy. If your dt is a naive instance representing UTC time:
timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)
If your dt is an aware instance
Alexander Belopolsky added the comment:
On Tue, Apr 5, 2011 at 1:45 PM, Marc-Andre Lemburg
wrote:
..
> BTW: A "timestamp" usually refers to the combination of date and
> time. The time.time() return value is "seconds since the Epoch".
> I usually call those val
Changes by Alexander Belopolsky :
--
components: +Extension Modules
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: -Python 2.5, Python 2.6, Python 3.1
___
Python tracker
<http://bug
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue11795>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue11734>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
While you are at it, can you also fix the same issue with "python -m tkinter"?
--
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
.. and "python -m turtledemo"?
--
___
Python tracker
<http://bugs.python.org/issue11571>
___
___
Python-bugs-l
Alexander Belopolsky added the comment:
On Thu, Apr 7, 2011 at 6:20 AM, Velko Ivanov wrote:
..
>> Converting datetime values to float is easy. Â If your dt is a naive
>> instance representing UTC time:
>>
>> Â Â timestamp = (dt - datetime(1970, 1, 1)) / timedelta(
Changes by Alexander Belopolsky :
--
dependencies: -Add aware local time support to datetime module
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue1
Alexander Belopolsky added the comment:
Why do you say "doctest doesn't use a -v option"?
Compare
$ python -m doctest Lib/doctest.py
and
$ python -m doctest -v Lib/doctest.py
Trying:
runner = DebugRunner(verbose=False)
Expecting nothing
ok
...
66 tests in 112 items.
Alexander Belopolsky added the comment:
Is there still interest in pursuing this? Normalizing out of bounds arguments
to datetime constructor is easy, but rather pointless. It is trivial to
implement this functionality using existing timedelta constructor:
def normdatetime(Y, M, D, h, m
Alexander Belopolsky added the comment:
> Or whether to change it at all. It's hard to imagine that
> applications may rely on that aspect of the behavior - they
> have to use eval, after all.
I would like to see this fixed. When working in interactive session, I find
myself
Alexander Belopolsky added the comment:
Hasn't this been fixed in the following changeset?
changeset: 43509:384f73a104e9
user:Benjamin Peterson
date:Wed Jul 07 20:54:01 2010 +
summary: make struct sequences subclass tuple; kill lots of code
--
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue11816>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue11822>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Would you like to display lambdas as well?
>>> dis('lambda x: x**2')
1 0 LOAD_CONST 0 ( at
0x1005c9ad0, file "", line 1>)
3 MAKE_FUNCTION0
6 RETURN
Alexander Belopolsky added the comment:
I am posting an unfinished patch (needs additional tests and possibly
documentation) to get feedback on whether it would make sense to wait for
issue11816 refactoring before implementing this. Note the code duplication
between disassemble and
Alexander Belopolsky added the comment:
On Mon, Apr 11, 2011 at 5:21 PM, Antoine Pitrou wrote:
..
Raymond>> If you disassemble a function, you typically want to see all the code
Raymond>> [defined] in that function.
+1 (with clarification in [])
If the function calls a func
Alexander Belopolsky added the comment:
Shouldn't this be forward ported to 3.3? Even though there is no bug in 3.x,
code using an explicit dict is cleaner and more robust than the current code
that relies on introspection to find methods that start with '_round_'.
Changes by Alexander Belopolsky :
--
stage: -> committed/rejected
type: -> behavior
versions: +Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
Isn't this a duplicate of issue1726687?
>
--
nosy: +Alexander.Belopolsky
title: mktime - OverflowError: mktime argument out of range - on very
specific time -> mktime - OverflowError: mktime argument out of range - on very
sp
Alexander Belopolsky added the comment:
If we can rely on the "versions" field, OP is using python 2.6. I don't think
this can be classified as a security issue, so it won't be appropriate to
backport issue1726687 to 2.6.
--
assignee: -> belopolsky
compone
Alexander Belopolsky added the comment:
I am not sure anyone other that Bob Ippolito can contribute later versions of
simplejson (or patches derived from those versions) to python.
ISTM that simplejson distribution is covered by MIT license [1] which is not
one of the valid "initial lic
Alexander Belopolsky added the comment:
On Fri, Apr 15, 2011 at 12:17 PM, Bob Ippolito wrote:
..
> That's not a problem, I'm more than happy to give permission for any patch.
> If it's easier I can consider dual-licensing in the simplejson source.
Can someone who can spea
Alexander Belopolsky added the comment:
> The "PDF generator" is PDFLaTeX, whose range of Unicode characters
> is very limited, so no, I can't fix it.
My search for pdflatex and unicode has quickly revealed this 4-year old howto:
http://tclab.kaist.ac.kr/ipe/pdftex_2.
Alexander Belopolsky added the comment:
On Fri, Apr 15, 2011 at 1:10 PM, Marc-Andre Lemburg
wrote:
>..
> Why don't you use the standard literal escapes for the examples
> and annotate the code points with the code point names ?
A am neutral on how to enter unicode characters
Alexander Belopolsky added the comment:
On Fri, Apr 15, 2011 at 1:23 PM, Marc-Andre Lemburg
wrote:
>..
> Why not wrap the calls with a repr() ?
>
Won't help:
"'Ӝ'"
I think you meant ascii(), but that's ugly IMO:
"'\\u04dc'"
M
Alexander Belopolsky added the comment:
I get the same:
$ python2.7
Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Alexander Belopolsky added the comment:
In python 2.x, sys.stdin.flush() is more or less equivalent to C fflush(stdin).
The behavior of fflush() on streams that are open for reading only is
undefined. [1]
Python 3.x io does not use C stdio library and therefore it is not surprising
that
Alexander Belopolsky added the comment:
On Wed, Apr 20, 2011 at 9:53 AM, STINNER Victor wrote:
..
> test_time.test_tzset() fails on "x86 FreeBSD 7.2 3.x":
> 'AEST-10AEDT-11,M10.5.0,M3.5.0' timezone becomes 'EST'.
I was able to reproduce this error by
Changes by Alexander Belopolsky :
--
components: +Documentation -Library (Lib)
resolution: -> fixed
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
See also issue 10640.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9614>
___
___
Python-bug
Alexander Belopolsky added the comment:
Another -1 from me. Similar changes to inline examples in the docs have been
rejected in the past for the same reasons as Raymond wrote. See issue 4649.
--
nosy: +belopolsky
___
Python tracker
<h
Alexander Belopolsky added the comment:
On the other hand, I would be +0 for the tzinfo-examples fixes of the form:
foo(x=default) vs. foo(x = default)
(This was also the fix suggested on the ML.)
Overall, I think it is good to judicially point out to PEP 8 violations where
fixes would
New submission from Alexander Belopolsky :
As implemented in issue 10827, use of 2-digits years in timetuples to mean
4-digit years straddling year 2000 is deprecated in 3.3. There is no mechanism
for issuing deprecation warning for access to a module variable, but a
deprecation note was
Alexander Belopolsky added the comment:
> The warnings at lines 284, 301, 461, 647 are benign.
I agree. There is no loss of data because Py_ssize_t variable bounds are
checked before these lines are reached.
> The attached patch fixes them.
I don't like these changes:
-Pda
Alexander Belopolsky added the comment:
On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor wrote:
> It looks like struct_time note is wrong: the year 70 is now 70 and not
> interpreted as 1970 anymore.
What makes you say so?
1970
--
___
Alexander Belopolsky added the comment:
On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor wrote:
..
>
> timemodule.c:
>
> PyDoc_STRVAR(module_doc,
> "...
> The tuple items are:\n\
> year (four digits, e.g. 1998)\n\
> ...")
>
> => That's wrong.
Alexander Belopolsky added the comment:
On Tue, Apr 26, 2011 at 6:30 PM, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> "What makes you say so?
>
> 1970"
>
> Don't write ">>> " using the email interface :-)
>
Alexander Belopolsky added the comment:
On Tue, Apr 26, 2011 at 6:09 PM, STINNER Victor wrote:
..
> .. class:: struct_time (...) A year value will be handled as described under
> :ref:`Year 2000 (Y2K) issues ` above.
This one needs to be removed.
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
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
401 - 500 of 3596 matches
Mail list logo