Josh Rosenberg added the comment:
fileinput's semantics are heavily tied to lines, not bytes. And processing
binary files byte by byte is rather inefficient; can you explain why this
feature would be of general utility such that it would be worth including it in
the standard library?
It's
Josh Rosenberg added the comment:
On memory: Yeah, it could be if the file didn't include any newline characters.
Same problem could apply if a text input file relied on word wrap in an editor
and included very few or no newlines itself.
There are non-fileinput ways of doing this, like I said
Josh Rosenberg added the comment:
And of course, missed another typo. open's first arg should be file, not
filename.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20992
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.rosenberg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19995
Josh Rosenberg added the comment:
I would think the argument for deprecation is that usually, people type
bytes(7) or bytes(somesmallintvalue) expecting to create a length one bytes
object using that value (happens by accident if you iterate a bytes object and
forget it's an iterable of ints
Josh Rosenberg added the comment:
Terry: You forgot to use a raw string for your timeit.repeat check, which is
why it blew up. It was evaluating the \0 when you defined the statement string
itself, not the contents. If you use r'b\0 * 7' it works just fine by
deferring backslash escape
Josh Rosenberg added the comment:
_check_int_field seems needlessly complex. When you want a value that is
logically an integer (not merely capable of being coerced to an integer), you
want object.__index__, per PEP 357, or to avoid explicit calls to special
methods, use operator.index. Any
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19251
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19915
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11107
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4356
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11406
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16465
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20632
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10977
___
___
Python-bugs
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17862
___
___
Python-bugs
Josh Rosenberg added the comment:
That's actually an argument to fix the C datetime implementation. Right now,
you get:
from decimal import Decimal as d
from datetime import datetime
datetime(d(2000.5), 1, 2)
datetime.datetime(2000, 1, 2, 0, 0)
This is wildly inconsistent
New submission from Josh Rosenberg:
Per my comments on #20858, datetime's argument handling is inconsistent. By
using the 'i' format code, non-integer types are being coerced to int, even as
other equivalent non-integer types are accepted (sometimes in a lossy fashion).
Example:
from
Josh Rosenberg added the comment:
Oh, definitely. No reason to delay this just because I have my knickers in a
twist on a tangential matter.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
Josh Rosenberg added the comment:
Thank you very much. Very helpful. I'll see about whipping up a preliminary
patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20861
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.rosenberg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18816
701 - 723 of 723 matches
Mail list logo