New submission from Matthew Woodcraft matt...@woodcraft.me.uk:
In CPython, the builtin max() and min() have the property that if there are
items with equal keys, the first item is returned. From a quick look at their
source, I think this is true for Jython and IronPython too.
I propose making
Matthew Woodcraft matt...@woodcraft.me.uk added the comment:
(1) Shouldn't 'reverse=True' be omitted in the second doc
addition?
Yes, of course, sorry.
(2) I'd also suggest adding a brief comment about what this
means for distinct, but equal, objects; otherwise it's not
really obvious
Matthew Woodcraft matt...@woodcraft.me.uk added the comment:
open(/proc/self/cmdline).read() should work on linux (note that the arguments
are separated by NULs).
--
nosy: +mattheww
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
New submission from Matthew Woodcraft matt...@woodcraft.me.uk:
It would be pleasant if TestCase._formatMessage, or something similar,
could be made part of the documented API; I think pretty much anyone
writing a custom TypeEqualityFunc is going to end up reimplementing it.
(This is the code
New submission from Matthew Woodcraft matt...@woodcraft.me.uk:
TestCase.assertItemsEqual uses two different techniques to describe the
differences in the inputs that it compares.
If the inputs are sortable, it sorts them and then uses
assertSequenceEqual to describe the difference between them
Matthew Woodcraft matt...@woodcraft.me.uk added the comment:
Terry J. Reedy wrote:
If I understand correctly, you are requesting that .assertItemsEqual
only use the 2nd (multiset comparison) method, so that if one want the
first method, one should directly call .assertSequenceEqual(sorted
Changes by Matthew Woodcraft matt...@woodcraft.me.uk:
--
nosy: +mattheww
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4106
___
___
Python-bugs
New submission from Matthew Woodcraft m...@pearson.co.uk:
In the current What's New In Python 3.0 documentation, under Changes
To Exceptions, it is claimed that the removal of StandardError is in
2.6 already.
But according to the 2.6.1 documentation, StandardError is still there
in its usual
Matthew Woodcraft matt...@woodcraft.me.uk added the comment:
The proposed --nopath0 option is something I've wished I had in the past.
If this is added, it would be good if it could be given a single-letter form
too, because it's an option that would be useful in #! lines (they don't
reliably
New submission from Matthew Woodcraft matt...@woodcraft.me.uk:
The documentation for the sqlite3 module contains the following statement,
under 'Cursor.rowcount':
For DELETE statements, SQLite reports rowcount as 0 if you make a DELETE FROM
table without any condition.
This doesn't happen
New submission from Matthew Woodcraft:
If I run my code using 'python -m' and there is an unhandled exception, the
tracebacks include lines from runpy.py (and now sometimes from
importlib._bootstrap) which don't provide useful information, and tend to
overwhelm the valuable part
Matthew Woodcraft added the comment:
For the record: the '-I' option (#16499) in Python 3.4 disables sys.path[0]
initialisation (among other things).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13475
New submission from Matthew Woodcraft:
I have a system where the default locale is C.UTF-8, and en_US.UTF-8 is
not installed.
But locale.normalize() unhelpfully converts "C.UTF-8" to "en_US.UTF-8".
So the following crashes for me:
python3.6 -c "import locale;local
Matthew Woodcraft added the comment:
That alias (C.UTF-8 to en_US.UTF-8) is surely a bug in itself nowadays. I've
filed #30755 .
--
nosy: +mattheww
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Matthew Woodcraft added the comment:
I've investigated a bit more.
First, I've tried with Python 3.7.0a1 . As you'd expect, PEP 537 means
this behaviour now also occurs when no locale environment variables at
all are set.
Second, I've looked through locale.py a bit. I believe what it calls
Matthew Woodcraft added the comment:
(For PEP 537 please read PEP 538, sorry)
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/i
New submission from Matthew Woodcraft <matt...@woodcraft.me.uk>:
PEP 405 says that the pyvenv.cfg file is found as follows:
« a pyvenv.cfg file is found either adjacent to the Python executable or one
directory above it (if the executable is a symlink, it is not derefe
New submission from Matthew Woodcraft :
The documentation for json.load() and json.loads() says:
« If the data being deserialized is not a valid JSON document, a
JSONDecodeError will be raised. »
But this is not currently entirely true: if the data is provided in bytes form
18 matches
Mail list logo