Aaron Hall added the comment:
Another obvious way to do it, but I'm +1 on it.
A small side point however - PEP 584 reads:
> To create a new dict containing the merged items of two (or more) dicts, one
> can currently write:
> {**d1, **d2}
> but this is neither o
New submission from Aaron Hall :
I've written three (or more) answers on Stack Overflow about how to use the
functions in the traceback module, and I code Python all day long.
Embarrassing confession: I just recommended the wrong traceback function in
email to fix the incorrect usa
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue34648>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue36551>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue35625>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
No need to keep this open, I agree with the core developers this shouldn't be
changed.
--
status: open -> closed
___
Python tracker
<https://bugs.python.org
Change by Aaron Hall :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue26103>
___
___
Pyth
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue35059>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
Should pydoc treat a partial object like a function?
Should a partial be an instance of a function?
Should we be able to add all the nice things that functions have to it?
If we want that, should we simply instantiate a function the normal way, with a
new
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue30129>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue32400>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
>From a design standpoint, I'm fairly certain the sort_keys argument was
>created due to Python's dicts being arbitrarily ordered.
Coercing to strings before sorting is unsatisfactory because, e.g. numbers sort
lexicographically instead of by nu
Aaron Hall added the comment:
Now that dicts are sortable, does that make the sort_keys argument redundant?
Should this bug be changed to "won't fix"?
------
nosy: +Aaron Hall
___
Python tracker
<https://bugs.pyt
Aaron Hall added the comment:
> What is wrong with just using shutil.rmtree()?
0. It's awkward to import just for demonstrations.
1. It's harder for new pythonists to discover.
2. A method provides discoverability in an object's namespace.
3. rmtree is a method of paths
New submission from Aaron Hall :
pathlib.Path wants the rmtree method from shutil
I think we need this method for a couple of reasons.
1. in shell, rm has the -r flag - In Python, we use shutil.rmtree as a best
practice for this.
2. I prefer to teach my students about pathlib.Path as opposed
Aaron Hall added the comment:
If/when order is guaranteed (3.7?) we should have a pprint that respects
current order,
-or-
we should get an improved pprint (maybe named pp or print?) that understands
mappings and other abstract data types.
I had a conversation about pprint at the Python
Aaron Hall added the comment:
New information: I think I have pinpointed at least a contributor to the
difference - closure lookups seem to be currently slightly slower (by a few
percent) than global lookups (see https://stackoverflow.com/a/46798876/541136).
And as we can see, an inner
Aaron Hall added the comment:
Static analysis:
My mental model currently says the rebuilt function every outer call is an
expense with no offsetting benefit. It seems that a function shouldn't build a
closure on every call if the closure doesn't close over anything immediately
u
Aaron Hall added the comment:
So... moving the closure (which may be called recursively) to the global scope
actually does improve performance (for small cases, about 10% - larger cases
amortize the cost of the closure being built, but in a 100 item dictionary,
still about 4% faster to
Aaron Hall added the comment:
Rejecting and withdrawing with apologies.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Aaron Hall :
Removing the closure seems to make the function about 10% faster.
Original source code at:
https://github.com/python/cpython/blob/3.6/Lib/ast.py#L40
Empirical evidence: astle.py
import timeit
from ast import literal_eval as orig_literal_eval
from ast import
Aaron Hall added the comment:
I like this idea too, but perhaps it should just be a multi-column bulleted
list (under the -m flag at
https://docs.python.org/3/using/cmdline.html#interface-options) with links to
the respective Standard Library doc?
Then we just ensure the documentation for
Aaron Hall added the comment:
Serhiy,
Not sure what else needs to be done to wrap this up. All checks are passing on
the pull request.
Thoughts?
--
___
Python tracker
<http://bugs.python.org/issue26
Changes by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<http://bugs.python.org/issue31319>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<http://bugs.python.org/issue31333>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
It seems that this issue is still properly open. (Another open issue seems be
related: http://bugs.python.org/issue30129)
In the docs on partial, we have:
>>> from functools import partial
>>> basetwo = partial(int, base=2)
>>> basetw
Aaron Hall added the comment:
I tweaked the docs a little more this morning, but I believe I am done making
any further changes unless so requested.
This issue doesn't say it's assigned to anyone. Is there anything else that
needs to h
Aaron Hall added the comment:
> Please also add yourself to Misc/ACKS.
Done!
--
___
Python tracker
<http://bugs.python.org/issue26103>
___
___
Python-bugs-lis
Aaron Hall added the comment:
Added news, working on tests
--
___
Python tracker
<http://bugs.python.org/issue26103>
___
___
Python-bugs-list mailing list
Unsub
Changes by Aaron Hall :
--
pull_requests: +2030
___
Python tracker
<http://bugs.python.org/issue26103>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
Bumping this - I intend to work on this next, if no objections.
--
___
Python tracker
<http://bugs.python.org/issue26103>
___
___
Changes by Aaron Hall :
--
pull_requests: +1908
___
Python tracker
<http://bugs.python.org/issue30463>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
I created a new PR based on rhettinger's feedback (which on consideration was
quite correct) with a fresh branch from master.
Terseness is retained, and I think this revision makes the documentation more
correct and complete. The rewording makes the beh
Changes by Aaron Hall :
--
pull_requests: +1905
___
Python tracker
<http://bugs.python.org/issue30449>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Aaron Hall:
We have __slots__ with other ABC's, see http://bugs.python.org/issue11333 and
http://bugs.python.org/issue21421.
There are no downsides to having empty slots on a non-instantiable class, but
it does give the option of denying __dict__ creation for subcla
Aaron Hall added the comment:
I've been working on this section quite a lot, trying to improve the flow of
content (which in the prior revision is a bit of a mish-mash of information in
the "Notes on using __slots__ section") - I intend to move some of that
information into
New submission from Aaron Hall:
The __slots__ documentation in the datamodel needs improvement.
For example:
> When inheriting from a class without __slots__, the __dict__ attribute of
> that class will always be accessible, so a __slots__ definition in the
> subclass is meaningl
New submission from Aaron Hall:
Based on the data-model documentation
(https://docs.python.org/2/reference/datamodel.html#invoking-descriptors) and
the dotted lookup behavior, the follow definitions are correct:
"If the descriptor defines __set__() and/or __delete__(), it is a
38 matches
Mail list logo