Changes by Eric Smith :
--
assignee: eric.smith ->
___
Python tracker
<http://bugs.python.org/issue5799>
___
___
Python-bugs-list mailing list
Unsubscri
Eric Smith added the comment:
Thanks for looking at this, Mark. If we could only assign issues to
Python 3.2 and 3.3 to change the pending deprecation warning to a real
one, and to remove the function entirely, we'd be all set! I'm always
worried we'll forg
Eric Smith added the comment:
Checked in to py3k in 72398. I'm reconsidering whether to make this
change in 2.7. I might make the change there, I'll have to check on the
impacts.
--
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
PEP 3101 says it's ignored. I chose to be strict. I don't see the
advantage of allowing but ignoring it.
--
___
Python tracker
<http://bugs.python.
Changes by Eric Smith :
--
assignee: georg.brandl -> eric.smith
___
Python tracker
<http://bugs.python.org/issue5963>
___
___
Python-bugs-list mailing list
Un
Eric Smith added the comment:
I updated the docs to say precision is not allowed for integers.
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Eric Smith added the comment:
"integer presentation types" is still not exactly correct, because there
are presentation types that work across value types. Specifically, 'n'
works on integers and floats. Precision is allowed for floats, but not ints:
>>> format(10
Eric Smith added the comment:
I'll look at it. The comma stuff needs to be added for 2.7 and 3.1, too.
--
___
Python tracker
<http://bugs.python.org/i
New submission from Eric Smith :
These 3 functions were deprecated in 2.7 and 3.1, and need to be removed
in 2.8 and 3.2.
This is currently assigned to version 3.2 only because the bug tracker
can't assign issues to 2.8.
--
assignee: eric.smith
components: Interpreter Core
key
Eric Smith added the comment:
>From the code:
/* assume %f produces at most (L)DBL_DIG
digits before and after the decimal
point, plus the latter plus a sign */
This is not correct. DBL_DIG is 15 on my x86 Linux machine.
printf("%.*f\n", DBL_DIG, 1e20) produces a str
Eric Smith added the comment:
I don't see any point in backporting to 3.0 at this point.
While it's definitely a problem in 2.6, it seems like a big change to
make in a bugfix release. I guess I'm +0 on it.
--
___
Python
Eric Smith added the comment:
It looks good to me.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue5829>
___
___
Python-bugs-list mailin
Eric Smith added the comment:
Any character after a ']' other than '.' or '[' triggers this bug:
>>> '{0[0]x}'.format([None])
Assertion failed: (0), function FieldNameIterator_next, file
Objects/stringlib/string_format.h, line 379
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue6081>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Fixed in:
trunk: r72848
release26-maint: r72849
py3k: r72850
release30-main: r72851
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Eric Smith added the comment:
I think this would be useful.
I don't fee terribly strongly about it, but I think I'd like the name
str.format_using_mapping(). When I initially saw this, I thought from
the name it was creating a format object (whatever that would be) from a
mapp
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue1943>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue6198>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I can duplicate this with Visual C++ 9.0 Express Edition on XP.
--
___
Python tracker
<http://bugs.python.org/issue6198>
___
___
Eric Smith added the comment:
Yes, this test passes on py3k on my Windows box. That would be a
nightmare if it didn't!
I agree that this is a test problem, not a code problem. I suggest we
just remove the offending line from formatfloat_testcases.txt in trunk.
I can do this and verify it
Eric Smith added the comment:
I had to remove a bunch of tests. Some were of the form
"5", rounded to before the 5. Some were comparing a large
number of digits.
Then there's these:
%#.0g 0 -> 0. Got '0.0'
%#.1g 0 -> 0. Got '0.0'
%#.2g 0
Eric Smith added the comment:
Checked in to trunk in r73240.
--
assignee: marketdickinson -> eric.smith
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http
Eric Smith added the comment:
Mark Dickinson wrote:
> Out of interest, what does '%#.0f' % 1.5 produce on
> Python 2.7/Windows? I'd expect to get '2.' both for
> round-half-to-even and round-half-away-from-zero.
> Does Windows round this down to
Eric Smith added the comment:
> [Mark]
>> Out of interest, what does '%#.0f' % 1.5 produce on
>> Python 2.7/Windows? I'd expect to get '2.' both for
>> round-half-to-even and round-half-away-from-zero.
>> Does Windows round this down to
Eric Smith added the comment:
In r73314, I restored the one test erroneously removed ("%#.0f 1.5 -> 2.").
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bug
Eric Smith added the comment:
I'll take a look at it. I've been meaning to use argparse, anyway.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
It's unfortunate (at least to me, but I know I have a skewed view of
this) that the help string in add_argument uses %-formatting when
formatting the result. I'd much rather it use str.format().
I see a couple of options:
- leave it as-is and
Eric Smith added the comment:
> So is this a cosmetic issue or a functional issue?
It's a cosmetic issue.
> Also, even if it could figure that out, how would it know whether
> a particular filename "stringification" with os.path.join() was
> intended for display
Eric Smith added the comment:
Tim Golden wrote:
> Just for information's sake, the shell APIs usually only accept backslashes.
That's good to know. Do you have any specific examples?
CreateFile and the like, which is where my experience is, take either.
90% of my Windows Python
Changes by Eric Smith :
--
assignee: -> eric.smith
components: +Interpreter Core -Extension Modules, Library (Lib)
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/iss
Eric Smith added the comment:
This is by design. Where d is a datetime, format(d, format_string)
returns d.strftime(format_string).
>>> d.strftime('30')
'30'
--
resolution: -> invalid
status: open -> closed
__
New submission from Eric Smith :
This was reported a few weeks ago by Benjamin Peterson, but I haven't
gotten around to fixing it. This is a reminder to myself to do it.
This is due to a bug in Objects/stringlib/formatter.h. Before I fix it
trunk, I need to backport some 3.1 code to kee
Eric Smith added the comment:
I agree with Mark: -1.
Do you have any specific use cases where this has caused problems, or is
this academic?
Maybe you can get some support for this on python-ideas, but I suggest
we close it in the meantime
Eric Smith added the comment:
Could you attach the source to a small example? I don't think anyone's
interested in running a random .msi file.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Changes by Eric Smith :
--
___
Python tracker
<http://bugs.python.org/issue8789>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Eric Smith :
Removed file: http://bugs.python.org/file17442/unnamed
___
Python tracker
<http://bugs.python.org/issue8789>
___
___
Python-bugs-list mailin
Changes by Eric Smith :
--
___
Python tracker
<http://bugs.python.org/issue8790>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Eric Smith :
Removed file: http://bugs.python.org/file17443/unnamed
___
Python tracker
<http://bugs.python.org/issue8790>
___
___
Python-bugs-list mailin
Changes by Eric Smith :
--
___
Python tracker
<http://bugs.python.org/issue8791>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Eric Smith :
Removed file: http://bugs.python.org/file17444/unnamed
___
Python tracker
<http://bugs.python.org/issue8791>
___
___
Python-bugs-list mailin
Eric Smith added the comment:
I don't think so. That quote came from the docstring for fnmatch.translate.
>>> help(fnmatch.translate)
Help on function translate in module fnmatch:
translate(pat)
Translate a shell PATTERN to a regular expression.
There is no way
Eric Smith added the comment:
This is a dupe of issue 7212.
--
nosy: +eric.smith
resolution: -> duplicate
status: open -> closed
superseder: -> Retrieve an arbitrary element from a set without removing it
___
Python track
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue1724822>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Keep in mind this isn't an entirely backwards compatible change. See issue
8413, for example.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/i
Eric Smith added the comment:
I think Alexander's example is best written as:
"Today is: {0:%a %b %d %H:%M:%S %Y}".format(datetime.now())
I agree with Brett that there's nothing unusual about having type-specific
formatting languages, and for datetime strftime is the ob
Eric Smith added the comment:
This documentation should also be added for datetime.time and datetime.date, in
addition to datetime.datetime.
--
___
Python tracker
<http://bugs.python.org/issue8
Eric Smith added the comment:
Unfortunately I think it's too late to do anything about this. I, for one, have
many lines of code in production that use the strftime format specifier for
datetime.__format__.
You only option would be to invent a new language that was somehow
distinguis
Eric Smith added the comment:
I think that every type that # does not apply to should raise an exception.
--
___
Python tracker
<http://bugs.python.org/issue8
Eric Smith added the comment:
I agree with David. For the issue raised here, at most I would make (list,
shell=True) and (str, shell=False) raise errors.
There's an issue (that I can't find right now) for creating functions that
convert from str->list and list->str for ca
Eric Smith added the comment:
get_integer uses the narrowest possible definition for integer indexes, in
order to pass all other strings to mappings.
>>> '{0[ 0 ]} {0[-1]}'.format({' 0 ': 'foo', '-1': 'bar'})
'foo bar'
Rem
Eric Smith added the comment:
I agree with Mark: there's probably nothing Python can do about this. It's
almost certainly an error with how Python is being invoked.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
That being said, it would be interesting to see what the registry key
HKEY_CLASSES_ROOT\Python.File\shell\open\command contains.
--
___
Python tracker
<http://bugs.python.org/issue7
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8972>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
versions: -Python 2.7
___
Python tracker
<http://bugs.python.org/issue7951>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I'll consider this a duplicate. Issue 7951 is the existing feature request for
this issue. I'll merge the nosy lists.
--
resolution: rejected -> duplicate
superseder: -> Should str.format allow negative indexes when used for
__
Eric Smith added the comment:
Closed issue 8985 as a duplicate of this; merging nosy lists.
--
nosy: +gosella, mark.dickinson, merwok
___
Python tracker
<http://bugs.python.org/issue7
Changes by Eric Smith :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue7951>
___
___
Python-bugs-list mailing list
Unsubscri
Eric Smith added the comment:
Addressing just the last part of Mark's message right now:
The PEP goes on to say:
Implementation note: The implementation of this proposal is
not required to enforce the rule about a simple or dotted name
being a valid Python identifier. ...
I
Eric Smith added the comment:
So the real question is is: how does that key get that invalid value? I can't
reproduce the problem.
I believe that key you mention is an alias for
HKEY_CURRENT_USER\Software\Classes\Applications\python.exe\shell\open\command,
which doesn't exis
Eric Smith added the comment:
I can see the point of allowing negative indices for a consistency point, but
is there really any practical problem that's currently causing people hardship
that this would solve?
As for the rest of it, I think it's just not worth the additional
Eric Smith added the comment:
I realize the ship's already sailed on this issue [1], but isn't it a problem
that editing this code makes it more difficult to apply patches from Gay's
original code? What do we do if Gay releases a new version of his code with bug
fixes?
[1] S
Eric Smith added the comment:
Just to be clear: I'm okay with this divergence, as long as we've made it
clear we're explicitly doing so and we've given our reasons. Mark's done
that, and of course he's the expert in the subject.
--
Eric Smith added the comment:
I suppose that's correct, although I have no way to test it.
I haven't spent a lot of time looking at the code in tokenizer.c, but if
there's a problem with sign-extending signed chars, it wouldn't surprise me if
it shows up in more than one
Eric Smith added the comment:
It would also be good to get a test case for this. I realize it's difficult,
but that's the sort of change that might get undone some day by someone going
through and "optimizing" the code.
--
__
Eric Smith added the comment:
It would be easier for me to review if you did it in the other order: fix the
variable names first.
Although I'm still pretty busy and won't have much time to review, so my needs
shouldn't be your
Eric Smith added the comment:
I agree with Raymond. I'm not convinced it allows you to write any code that
you can't currently write, and I'm fairly sure it violates the moratorium.
Implementing this would clearly put a burden on other implementations.
Marking as &q
Eric Smith added the comment:
I agree with this approach.
--
___
Python tracker
<http://bugs.python.org/issue9020>
___
___
Python-bugs-list mailing list
Unsub
Eric Smith added the comment:
>
> Alexander Belopolsky added the comment:
>
>> - ignore the rounding mode completely, always doing round-half-to-even.
> +1
Agreed. +1
--
___
Python tracker
<http://bugs
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9077>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
-1 on this functionality being in os, for the same reasons David mentions.
I find both of these behaviors useful and I have small utility functions of my
own that do the same (and ignore any errors). I'm not so sure they need to be
in stdlib, thoug
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9109>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I think you could preserve backward compatibility by doing something like the
following (in httplib):
_sentinel = object()
__HTTP_DEFAULT_TIMEOUT = _sentinel
In httplib.HTTPConnection.__init__(), in Python 2.6.
def __init__(self, host, port=None, strict=None
Eric Smith added the comment:
We can't change this for 2.6 since it's not a bug fix, and it's too late for
2.7. I doubt we would ever change it for 2.x, since it's likely to break other
code is subtle ways.
In 3.x all classes are new-style, so it's not at issu
Eric Smith added the comment:
Thanks for taking the lead on this.
In this sentence:
+The new format syntax also supports new and different options, showed in the
+follow examples.
"showed" should be "shown".
I like to use an example showing attribute access on named
Eric Smith added the comment:
Instead of "named types", I meant "named arguments", of course.
--
___
Python tracker
<http://bugs.python.org/issue9139>
___
Eric Smith added the comment:
This looks like a definite improvement to me.
When you merge to py3k, don't forget to change the versionchanged tag to 3.1.
--
___
Python tracker
<http://bugs.python.org/i
Eric Smith added the comment:
I think I'd just delete both instances of "now". And now that I read it more
critically, "position" should be "positional". How's this rewording:
.. versionchanged:: 2.7
The positional argument specifiers can be omi
Eric Smith added the comment:
Looks good.
--
___
Python tracker
<http://bugs.python.org/issue9139>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
+1 from me, too.
You might want to reference this issue in the Misc/NEWS entry.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9
Eric Smith added the comment:
I get the same behavior in 2.7. Adding '--', I get:
>>> p.parse_args('-b 123 456 -- bla'.split())
Namespace(bar=[123, 456], foo='bla')
Which is what I expect.
Éric: From your comment, I'm not sure if you think it
Eric Smith added the comment:
Surely we don't want to find every place that uses structseq and fix them. This
will no doubt break user code as well.
I think we'll need to fix structseq to somehow have its old behavior.
--
nosy: +
Eric Smith added the comment:
The note about no quoting meta-chars is in the docstring for fnmatch.translate,
not the documentation. I still see it in 3.1. I have a to-do item to add this
to the actual documentation. I'll add an
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9226>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Excellent explanation. It's just a misunderstanding of how the language works,
so nothing to do here. Closing.
--
nosy: +eric.smith
resolution: -> invalid
status: pending -> closed
___
Python tra
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9265>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
The change looks reasonable to me. It needs a test.
--
nosy: +eric.smith
stage: -> unit test needed
___
Python tracker
<http://bugs.python.org/iss
Eric Smith added the comment:
I believe it's true that Windows does not offer process replacement. I'm sure
you could perform some tricks by essentially writing your own loader, but the
practical answer is no. It might be worth looking into how cygwin implements
exec().
-
Eric Smith added the comment:
Yes, the unicode patch looks okay to me.
--
___
Python tracker
<http://bugs.python.org/issue9036>
___
___
Python-bugs-list mailin
Eric Smith added the comment:
I'm not sure where you'd put this. The defining characteristic of threads is
that _all_ objects are shared among them.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.
Eric Smith added the comment:
Yes, that is what it says; and yes, it should be "string". Although why all of
the methods say "string" and not "str" isn't clear to me. Probably historical.
The doc string for str.__format__ contains the same e
Eric Smith added the comment:
And now that I look at it, the subject contains "__format__" but the original
message says "format". Both cases are already covered!
--
___
Python tracker
<http://bu
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9332>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9334>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
Wouldn't you have to set this, then restore it? This would then open a non
thread-safe race condition, assuming this is a per-process setting, not a
thread-local setting.
Not that I'm necessarily opposed, but it&
Eric Smith added the comment:
I think this is a good idea. To test how much impact it would have, I changed
float's str to return the same value as repr. regrtest broke only 3 tests:
test_float test_tokenize test_unicodedata. It's not clear to me why unicodedata
failed.
With s
Eric Smith added the comment:
I think under the "we're all consenting adults" doctrine that it should be
allowed. If you really want that behavior, why force the char*/%s dance at each
call site when it's easy enough to do it in one place? I don't think anyone
suppl
Eric Smith added the comment:
The feature request seems reasonable to me, too.
I don't recall if sys.getdefaultencoding() can change while a program is
running. If so, you might want to change:
def read(self, filenames, encoding=sys.getdefaultencoding()):
to:
def read(self, file
Eric Smith added the comment:
I agree this should be closed and moved to #8350.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue9
Changes by Eric Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue8350>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Smith added the comment:
I think it would be clearer if the footnote said something like "Negative 1 day
plus 19 hours is equivalent to the timedelta argument of -5 hours)". If I
hadn't been following the discussion on #python-dev the point of this doc
change would have
701 - 800 of 805 matches
Mail list logo