Alexander Belopolsky added the comment:
Rather than adding a new method to unicodedata, what do you think about adding
a type keyword argument to unicodedata.name()? It can default to "canonical"
and have possible values "control", "abbreviatio
Alexander Belopolsky added the comment:
> Can a character or sequence have multiple aliases?
Yes, for example, most control characters have two aliases (and no name).
;NULL;control
;NUL;abbreviation
0001;START OF HEADING;control
0001;SOH;abbreviation
0002;START OF TEXT;control
0002;
Alexander Belopolsky added the comment:
unicodedata.name() was discussed in #12353 (msg144739) where MvL argued that
misspelled names are better than corrected because they are more likely to
appear misspelled in other sources. I am not sure I buy this argument.
Someone googling for
Alexander Belopolsky added the comment:
I mistyped issue reference above it should be #12753, not 12353.
--
___
Python tracker
<http://bugs.python.org/issue18
Alexander Belopolsky added the comment:
> about the problems you mentioned in msg144836, can you report
> it in a new issue or, if there are already issues about them,
> add a message there?
I believe that would be #4610.
--
nosy: +belopolsky
superseder: -> Unicode case
Alexander Belopolsky added the comment:
There has been a relatively recent discussion of case mappings under #12753
(msg144836).
I personally agree with Martin: str.upper/lower should remain the way it is - a
simplistic 1-to-1 mapping using UnicodeData.txt fields. More sophisticated
case
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file30680/42973dfea391.diff
___
Python tracker
<http://bugs.python.org/issue18236>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file30679/3ed5bb7fcee9.diff
___
Python tracker
<http://bugs.python.org/issue18236>
___
___
Pytho
Alexander Belopolsky added the comment:
I would like someone review this change:
https://bitbucket.org/alexander_belopolsky/cpython/commits/92c187025d0a8a989d9f81f2cb4c96f4eecb81cb?at=issue-18236
The patch can go in without this optimization, but I think this is the right
first step towards
Alexander Belopolsky added the comment:
It looks like at least the OP issue has been fixed in #12736:
>>> 'ß'.upper()
'SS'
--
resolution: -> out of date
status: open -> closed
superseder: -> Request for python casemapping functions to use f
Changes by Alexander Belopolsky :
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue15223>
___
___
Pyth
Alexander Belopolsky added the comment:
MAL> Please leave the function as it is, i.e. a 1-1 mapping to the
MAL> official, non-changing Unicode name reference (including
MAL> spelling errors, etc). Same with code points that have no name.
Since we have code points with no name - it i
Alexander Belopolsky added the comment:
Here is an example of "prior art" that is relevant to this discussion:
"""
charnames::viacode(code)
..
As mentioned above under ALIASES, Unicode 6.1 defines extra names (synonyms or
aliases) for some code points, most of which
Alexander Belopolsky added the comment:
> The .aliases() function would have to return a list, not a single
> name, so a parameter would cause the return type to change, which
> is not a good idea.
You misunderstood my proposal. .name() will still return a single name, but
the type
Alexander Belopolsky added the comment:
It is not easy to figure out the consequences (if any) of UCD change for python
grammar from unicode standard release notes. I went through this exercise for
a few releases and I thought it would be useful to share in release notes.
Since there does
Alexander Belopolsky added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue18453>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
It would be nice if this context manager had an option to redirect the file
descriptor 0 rather than just sys.stdout. (For those familiar with py.test, I
am asking for an equivalent of --capture=fd functionality.)
Unlike patching sys.stdout, which is
Alexander Belopolsky added the comment:
In my post "fd 0" should have been "fd 1", of course. (Proving that it is not
trivial to get it right:-)
--
___
Python tracker
<http://bug
Alexander Belopolsky added the comment:
Yes, I did miss Victor's dup2() comment. (It looks like I did not subscribe to
this issue from the start and missed early discussion - sorry.)
The simple feature is not very useful for me. I have to deal with too many
cases of misguided code like
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue18538>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue18481>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
resolution: -> wont fix
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11571>
___
___
Pyth
Alexander Belopolsky added the comment:
I believe this is related to the fact that timedelta * float is not supported
in 2.x:
Python 2.7.5 (default, May 24 2013, 15:56:16)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or
Alexander Belopolsky added the comment:
> Does a result of one and one half seconds make sense as the result of a floor
> division operation?
Yes. Timedeltas behave as integers containing the number of microseconds:
>>> timedelta(microseconds=1) / 2
datet
Alexander Belopolsky added the comment:
Is there a reason why there is no "review" link? Could it be because the file
is uploaded as is rather than as a patch?
In any case, I have a question about this code in sum:
# Convert running total to a float. See comment
Alexander Belopolsky added the comment:
The implementation of median and mode families of functions as classes is
clever, but I am not sure it is a good idea to return something other than an
instance of the class from __new__(). I would prefer to see a more traditional
implementation along
Alexander Belopolsky added the comment:
What is so special about seconds? Why not days? As in
>>> timedelta(3) // 2
timedelta(1)
Note that in 3.x we have timedelta over timedelta division that lets you do
floor division in arbitrary time units.
What is the use case for timedel
Alexander Belopolsky added the comment:
There are two schools of thought here. One school (MAL and Mark) thinks of
durations as real number of seconds. The other school (Tim and I) think of
durations as integer number of resolution intervals. This is why I and Tim
before me resisted adding
Alexander Belopolsky added the comment:
> I just want `timedelta / int` to do the same thing in Python 2.7
> with __future__.division as `timedelta / int` does in Python 3.
It other words you want to backport timedelta / int true division. I am afraid
it is 3-4 years too late for this r
Alexander Belopolsky added the comment:
Here is the use-case that was presented to support adding additional operations
on timedelta objects:
"""
I'm conducting a series of observation experiments where I
measure the duration of an event. I then want to do various
statisti
Alexander Belopolsky added the comment:
This issue is effectively a duplicate #1083 (see msg101281.)
--
___
Python tracker
<http://bugs.python.org/issue18
Alexander Belopolsky added the comment:
I'd say fix the test. Raising ValueError is correct in this case.
UnicodeError was an implementation artifact.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/is
Alexander Belopolsky added the comment:
I cleaned up the patch a little:
1. Removed now unused static round_to_long() function.
2. Removed commented out code.
Mark,
Any reason not to apply this? Do we need a NEWS entry for something like this?
--
priority: low -> normal
stage: t
Alexander Belopolsky added the comment:
With the current patch we still have the following quirks:
>>> timedelta(seconds=0.6112295) == timedelta(seconds=1)*0.6112295
False
>>> timedelta(seconds=0.6112295) == timedelta(seconds=round(0.6112295, 6))
False
This is not a reason
Alexander Belopolsky added the comment:
I would just change "my usual course is to avoid using lambda" to "PEP 8
prescribes using def." Note that PEP 8 itself displays f = lambda x: 2*x as an
example of what not to do. I see no problem with the current examples.
Alexander Belopolsky added the comment:
> Once we start special-casing types, where will it end?
At the point where all stdlib types are special-cased. :-)
> In the meantime, there's a simple way to do this:
py> from datetime import timedelta as td
py> data = [td(2), td(1),
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11033>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
resolution: -> fixed
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Changes by Alexander Belopolsky :
--
resolution: -> rejected
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Alexander Belopolsky :
--
assignee: belopolsky ->
___
Python tracker
<http://bugs.python.org/issue1764286>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
On Mon, Aug 5, 2013 at 2:14 PM, Steven D'Aprano wrote:
> > As you say, there's no state to be stored. So why not simply have
> separate functions `median`, `median_low`, `median_high`, `median_grouped`,
> etc.?
>
> Why hav
Alexander Belopolsky added the comment:
According to this comment, ssb.values can be null:
/* A sortslice contains a pointer to an array of keys and a pointer to
* an array of corresponding values. In other words, keys[i]
* corresponds with values[i]. If values == NULL, then the keys are
Changes by Alexander Belopolsky :
--
dependencies: +PEP 3121 Refactoring applied to _csv module
___
Python tracker
<http://bugs.python.org/issue15787>
___
___
Changes by Alexander Belopolsky :
--
dependencies: +PEP 3121, 384 refactoring applied to curses_panel module
___
Python tracker
<http://bugs.python.org/issue15
Changes by Alexander Belopolsky :
--
dependencies: +PEP 384 Refactoring applied to _csv module
title: PEP 3121 Refactoring -> PEP 3121, 384 Refactoring
___
Python tracker
<http://bugs.python.org/issu
Changes by Alexander Belopolsky :
--
dependencies: +PEP 384 inconsistent with implementation
___
Python tracker
<http://bugs.python.org/issue15787>
___
___
Pytho
Changes by Alexander Belopolsky :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue15787>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
"""
Regarding the suggestion of separating PEP3121 and PEP384. It might be true
that datetime and other modules do not benefit directly from PEP 384, however
it is still a fact that the stdlib modules should be seen as a set of reference
Alexander Belopolsky added the comment:
With respect to PEP 384 refactoring, I would like to see
Tools/scripts/abitype.py used for most of the conversions. The PEP itself can
probably be amended to advertise this tool more prominently
Alexander Belopolsky added the comment:
Eric,
Could you share details of your use-case? My experience with subclassing from
basic python types including date/time has been mostly negative. The problem
is that when I subclass, I want to inherit the rich set of operations such as
Alexander Belopolsky added the comment:
+1
:-)
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue18718>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
I strongly believe that it is worthwhile to invest in fixing abitype.py. It is
much easier to review a patch to one python script than to review 50+ patches
to C files. There is no excuse for this tool not to work on all stdlib
modules. If there are
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue18800>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue18874>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I'll review your patch.
On Apr 18, 2012, at 4:53 PM, Joe Peterson wrote:
>
> Joe Peterson added the comment:
>
> Ah. I figured that one of the Python devs would be who would review it. Is
> this the normal path for bugs?
Alexander Belopolsky added the comment:
Joe,
Your changes to the test suit don't apply cleanly anymore. I can probably fix
the conflicts, but if you could post an updated patch it will help.
Thanks.
--
nosy: -Alexander.Belopolsky
___
P
Alexander Belopolsky added the comment:
I still get conflicts:
$ patch -p0 < imaplib_Internaldate2tuple_dst_fix_python32.patch
patching file Lib/imaplib.py
Hunk #2 FAILED at 1312.
Hunk #3 succeeded at 1347 (offset 8 lines).
Hunk #4 FAILED at 1379.
2 out of 4 hunks FAILED -- saving rejects
Alexander Belopolsky added the comment:
My bad. For some reason I assumed that the latest patch would be at the top of
the files list.
David, the patch is good. Should I go ahead and commit?
--
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
On Tue, Apr 24, 2012 at 10:42 AM, Joe Peterson wrote:
..
> Is it also possible to get the pyhton2.7 version one in?
I don't see any reason not to. This is a bug fix and should go into a
maintenance release. I will wait to hear from David, wh
Alexander Belopolsky added the comment:
This is a bit of a hack, but seems to get the work done. Does anyone have any
objections to committing?
--
___
Python tracker
<http://bugs.python.org/issue14
Alexander Belopolsky added the comment:
See issue2736.
--
nosy: +Alexander.Belopolsky
___
Python tracker
<http://bugs.python.org/issue14908>
___
___
Python-bug
Alexander Belopolsky added the comment:
Barry,
Did you review the long discussion under issue 2736? Specifically, please
note the part about mxDateTime, ticks() and gmticks(). I am -0 on adding
ticks() and gmticks() and as far as I can tell no one has implemented these
methods for
Alexander Belopolsky added the comment:
On Mon, Jun 4, 2012 at 11:57 AM, Barry A. Warsaw wrote:
> I've recently had to convert a bunch of code from using mxDateTime to
> datetime+time,
That's a valuable experience. How big of a deal was the lack of
.ticks() and .gmticks()?
Alexander Belopolsky added the comment:
On Mon, Jun 4, 2012 at 1:33 PM, Alexandre Zani wrote:
> I think the easiest and most intuitive approach is to simply define
> timestamp()
> as being the reverse of fromtimestamp().
I would like to invite everyone to review the discussion l
Alexander Belopolsky added the comment:
On Mon, Jun 4, 2012 at 3:21 PM, Alexandre Zani wrote:
> Let me know if I misunderstood Alexander, but if I didn't this should be
> documented with
> the datetime object. Based upon my understanding, the datetime object is a
> bad cho
Alexander Belopolsky added the comment:
Barry,
I looked at your changeset at
http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/revision/1354 and
at the specification at
http://developers.facebook.com/docs/reference/api/event/.
Am I correct that you are parsing "s
New submission from Alexander Belopolsky :
Guido: Let's make it so. / python-dev
--
components: Extension Modules, Library (Lib)
messages: 162368
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Allow equality comparison between naive and aware datetime ob
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue15006>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
nosy: -Alexander.Belopolsky
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/i
Changes by Alexander Belopolsky :
--
keywords: +needs review
nosy: +pitrou
stage: -> commit review
___
Python tracker
<http://bugs.python.org/issue15006>
___
_
Changes by Alexander Belopolsky :
--
keywords: +patch
Added file: http://bugs.python.org/file25837/issue15006.diff
___
Python tracker
<http://bugs.python.org/issue15
Alexander Belopolsky added the comment:
On Wed, Jun 6, 2012 at 7:32 PM, STINNER Victor wrote:
> Hum, can you please explain your change? If it is explained on python-dev,
> can you add a link to the email?
Please see http://mail.python.org/pipermail/python-dev/2012-June/119933.html
I
Alexander Belopolsky added the comment:
I think the attached patch implements what was agreed to on python-dev. We
need more tests, particularly around DST change. I tested the patch on OSX,
but I am interested to hear feedback from users of other OSes.
--
keywords: +patch
stage
Changes by Alexander Belopolsky :
--
assignee: belopolsky ->
___
Python tracker
<http://bugs.python.org/issue3367>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue9256>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Closing for the lack of interest. Proposed time.now() is already available as
datetime.now().time(). No use case justifying any improvement in this area was
presented.
--
resolution: postponed -> wont fix
status: open ->
Alexander Belopolsky added the comment:
Updated patch adds a few more tests and improves error handling in C
implementation.
--
nosy: +haypo
Added file: http://bugs.python.org/file25858/issue14908.diff
___
Python tracker
<http://bugs.python.
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file25854/issue14908.diff
___
Python tracker
<http://bugs.python.org/issue14908>
___
___
Python-bug
Alexander Belopolsky added the comment:
Bumping priority as a reminder to get this in.
--
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issu
Changes by Alexander Belopolsky :
--
stage: needs patch -> committed/rejected
type: behavior -> enhancement
versions: -Python 2.7, Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/i
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11823>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
Added ReST documentation. Will commit soon. Merging nosy list from issue 2736.
--
nosy: +Jay.Taylor, Neil Muller, amaury.forgeotdarc, andersjm, catlee,
davidfraser, erik.stephens, guettli, hodgestar, jribbens, mark.dickinson, ping,
pitrou
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file25858/issue14908.diff
___
Python tracker
<http://bugs.python.org/issue14908>
___
___
Python-bug
Alexander Belopolsky added the comment:
I associated my commit with issue 2736 by mistake, but it is probably a good
thing because that issue contains a longer history.
Closing this as a duplicate.
--
resolution: -> duplicate
stage: commit review -> committed/rejected
status
Changes by Alexander Belopolsky :
--
superseder: Add aware local time support to datetime module ->
___
Python tracker
<http://bugs.python.org/issue2736>
___
_
Changes by Alexander Belopolsky :
--
title: tutorial should use best practices in user defined execeptions section
-> tutorial should use best practices in user defined exceptions section
___
Python tracker
<http://bugs.python.org/issu
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue15034>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
This was originally posted on python-dev, but I hope reposting it here will
make this issue easier to navigate.
"""
With addition of fixed offset timezone class and the timezone.utc
instance [0], it is easy to get UTC time as an aware da
Alexander Belopolsky added the comment:
Reopening. given the uncertainty with #9527, this issue may result in getting
the TZ-aware local time support in stdlib sooner.
--
resolution: duplicate ->
stage: committed/rejected -> patch review
status: closed -> open
versions: +P
Alexander Belopolsky added the comment:
Two objections have been raised to the proposed datetime.localtime() function:
1. It offers the third subtly different way to obtain current time in datetime
module. The first two being provided by datetime.now() and datetime.today().
2. C library
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file25940/testtz.py
___
Python tracker
<http://bugs.python.org/issue9527>
___
___
Python-bugs-list m
Alexander Belopolsky added the comment:
David,
Isn't the requested feature now implemented as email.utils.format_datetime()?
Also, what is the difference between RFC 3339 format and the one provided by
datetime.isoformat?
>>> print(datetime(2000,1,1, tzinfo=timezone.utc
Alexander Belopolsky added the comment:
Does anyone still care about this issue? I think the error message in 3.2 is
good enough and fixing this in 2.x is not worth the trouble. I am inclined to
close this as "won't fix".
--
versions: +Python
Alexander Belopolsky added the comment:
Bumping priority to get this in before beta.
--
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issue1
Alexander Belopolsky added the comment:
I've simplified Paul's patch by removing timegm and mktimetz functions. Also,
platforms that don't support tm_zone are unaffected.
--
stage: patch review -> commit review
Added file: http://bugs.python.org/file26002
Alexander Belopolsky added the comment:
On Wed, Jun 13, 2012 at 7:08 PM, Paul Boddie wrote:
> I think you may have forgotten to remove docstring references to those
> functions.
Good catch. BTW, did you write the additional tests for strptime?
This is the only thing that I want to add
Changes by Alexander Belopolsky :
--
resolution: -> fixed
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
Added documentation and simplified changes to python implementation. I think
this can go to 3.3.
--
versions: +Python 3.3 -Python 3.4
Added file: http://bugs.python.org/file26023/issue15006a.diff
___
Python
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue15006>
___
___
Python-bugs-list mailing list
Un
1801 - 1900 of 3596 matches
Mail list logo