[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-05 Thread Brandt Bucher
Brandt Bucher added the comment: Of course. After my PR is merged, you can make another PR that replaces the ".. TODO: BPO-39868" line with a description of how assignment expressions work. Likely much of the language can be borrowed from the PEP. Let me know if you need hel

[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-05 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +18151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18793 ___ Python tracker <https://bugs.python.org/issu

[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-05 Thread Brandt Bucher
Brandt Bucher added the comment: Sorry, I hadn't seen your comment... :( I've already finished the grammar specification bit, but not the prose description of how assignment expressions work, etc. How about I leave that empty in my PR and you can actually do the documentation part

[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-05 Thread Brandt Bucher
New submission from Brandt Bucher : It looks like https://docs.python.org/3/reference/expressions.html and https://docs.python.org/3/reference/compound_stmts.html were never updated for named expressions. Because this change has to be backported, it's sort of a blocker for my PEP 614 doc

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Brandt Bucher
Brandt Bucher added the comment: Agreed. I'll have something up later, hopefully. I'll add a tiny blurb to whatsnew, as well as adding the PEP to the "See also:" note in https://docs.python.org/3.9/reference/compound_stmts.html and updating the mini-grammar there. I don't thin

[issue36144] Dictionary union. (PEP 584)

2020-03-01 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +18086 pull_request: https://github.com/python/cpython/pull/18729 ___ Python tracker <https://bugs.python.org/issue36

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: Sounds good, I'll have these up soon. -- ___ Python tracker <https://bugs.python.org/issue36144> ___ ___ Python-bugs-list mailin

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: I think we're only seriously considering the first variant (although implemented slightly differently, see my last two messages). And __ror__ would probably change, returning the type of self. What are the "problems" with it, exactl

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: Just to clarify: If we decide to check isinstance(other, (ChainMap, dict)), '|' should probably be used. If we decide to check isinstance(other, Mapping), I think the copy/update methods should be used

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: > Im not sure if the dict(other) cast is the best way to go about it. Maybe > this would work? Yeah, I was imagining something like that... I used the cast for brevity in my reply but that probably wasn't helpful. Note that for __or__, we probabl

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: ...however, I could also see the (similar): ChainMap(other, *cm.maps) # Note that `other` is the original reference here. Being okay as well. Maybe even better, now that I've written it out. -- ___ Python

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: I believe that: cm | other Should return the equivalent of: ChainMap(cm.maps[0] | dict(other), *cm.maps[1:]) -- ___ Python tracker <https://bugs.python.org/issue36

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Brandt Bucher
Brandt Bucher added the comment: > Note that in your last message, `d1 |= cm2` will fail for this reason. You > can of course fix that with `d1 |= dict(cm2)`, although IIUC there's no > reason one of the maps couldn't be some other [Mutable]Mapping. Mappings and iterables

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: > I think for `|=` the only choice is for it to be essentially an alias to > `.update()`. So that means `cm |= other` becomes `cm.maps[0].update(other)`. Agreed. > These semantics make `|=` behave rather differently from `|`. Is that okay? > I

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: The plan is to follow dict’s semantics. The |= operator will basically delegate to the first map in the chain. The | operator will create a new ChainMap where the first map is the merged result of the old first map, and the others are the same. So, basically

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Brandt Bucher
Brandt Bucher added the comment: Yep. I'm currently working on OrderedDict, defaultdict, and MappingProxyType. My brother is looking to make his first contribution, so he'll be taking care of ChainMap. -- ___ Python tracker <ht

[issue36144] Dictionary union. (PEP 584)

2020-02-25 Thread Brandt Bucher
Change by Brandt Bucher : -- title: Dictionary addition. (PEP 584) -> Dictionary union. (PEP 584) ___ Python tracker <https://bugs.python.org/issue36144> ___ _

[issue36144] Dictionary addition. (PEP 584)

2020-02-25 Thread Brandt Bucher
Brandt Bucher added the comment: As a somewhat simpler example: >>> f = {False: False} >>> z = {0: 0} >>> f | z {False: 0} >>> {**f, **z} {False: 0} >>> f.update(z); f {False: 0} Though these hairier cases aren't explicitly addressed, the c

[issue36144] Dictionary addition. (PEP 584)

2020-02-25 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +18020 pull_request: https://github.com/python/cpython/pull/18659 ___ Python tracker <https://bugs.python.org/issue36

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Brandt Bucher
Brandt Bucher added the comment: My current PR plans are: - Docs. This will include the dict docs and the whatsnew 3.9. I assume we have no plans to cover this in the tutorials, etc. Let me know if I'm missing anything here. - collections.defaultdict, with tests. I don't think this needs

[issue39537] Change line number table format

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue39537> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37196] Allowing arbitrary expressions in the @expression syntax

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher resolution: -> duplicate status: open -> closed superseder: -> PEP 614: Relaxing Grammar Restrictions On Decorators ___ Python tracker <https://bugs.python.or

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PEP 614: Relaxing Grammar Restrictions On Decorators ___ Python tracker <https://bugs.python

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-02-20 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +17949 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18570 ___ Python tracker <https://bugs.python.org/issu

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-02-20 Thread Brandt Bucher
New submission from Brandt Bucher : The attached PR implements PEP 614's revised grammar for decorators, with tests. In short: decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE becomes decorator: '@' namedexpr_test NEWLINE I'm marking it as DO-NOT-MERGE until the PEP is accepted

[issue39411] pyclbr rewrite using AST

2020-02-13 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue39411> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-12 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +17870 pull_request: https://github.com/python/cpython/pull/18496 ___ Python tracker <https://bugs.python.org/issue39

[issue39320] Handle unpacking of */** arguments and rvalues in the compiler

2020-01-29 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +17641 pull_request: https://github.com/python/cpython/pull/18264 ___ Python tracker <https://bugs.python.org/issue39

[issue39320] Handle unpacking of */** arguments and rvalues in the compiler

2020-01-28 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue39320> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39320] Handle unpacking of */** arguments and rvalues in the compiler

2020-01-28 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +17623 pull_request: https://github.com/python/cpython/pull/18243 ___ Python tracker <https://bugs.python.org/issue39

[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-28 Thread Brandt Bucher
Brandt Bucher added the comment: Perhaps. I've opened a PR to update the comment with more info. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-28 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +17619 pull_request: https://github.com/python/cpython/pull/18240 ___ Python tracker <https://bugs.python.org/issue39

[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread Brandt Bucher
Change by Brandt Bucher : -- resolution: -> duplicate ___ Python tracker <https://bugs.python.org/issue39440> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread Brandt Bucher
Brandt Bucher added the comment: Prior discussion at https://bugs.python.org/issue18305. Note the final comment. In short, this is a breaking semantic change, and the general consensus is that using sum for sequence concatenation is an anti-pattern. -- nosy: +brandtbucher

[issue38361] syslog: Default "ident" in syslog.openlog() shouldn't contain slash

2020-01-15 Thread Brandt Bucher
Change by Brandt Bucher : -- components: +Library (Lib) -Extension Modules nosy: +brandtbucher resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracke

[issue38721] modulefinder should use import hooks properly

2019-11-21 Thread Brandt Bucher
Brandt Bucher added the comment: See prior discussion on this here: https://github.com/python/cpython/pull/11787#discussion_r256442282 -- ___ Python tracker <https://bugs.python.org/issue38

[issue38721] modulefinder should use import hooks properly

2019-11-21 Thread Brandt Bucher
Brandt Bucher added the comment: I'm not sure what you mean when you say "modulefinder currently will detect modules imported by a script dynamically by running the script"... modulefinder is completely static, no? I also think that changing sys.path like this is a bad ide

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue38870> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38823] Improve stdlib module initialization error handling.

2019-11-20 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16790 pull_request: https://github.com/python/cpython/pull/17298 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-20 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16769 pull_request: https://github.com/python/cpython/pull/17276 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks Victor. These obviously aren’t urgent, so feel free to return to them whenever’s convenient. I also pinged you on #17235 (_tracemalloc) too. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16753 pull_request: https://github.com/python/cpython/pull/17260 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-18 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16747 pull_request: https://github.com/python/cpython/pull/17250 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-18 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16736 pull_request: https://github.com/python/cpython/pull/17236 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-18 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16735 pull_request: https://github.com/python/cpython/pull/17235 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-17 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16719 pull_request: https://github.com/python/cpython/pull/17216 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-17 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16718 pull_request: https://github.com/python/cpython/pull/17215 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-17 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16711 pull_request: https://github.com/python/cpython/pull/17206 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-17 Thread Brandt Bucher
Brandt Bucher added the comment: Yes, there are still a few dozen modules I plan to update! -- ___ Python tracker <https://bugs.python.org/issue38823> ___ ___

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16702 pull_request: https://github.com/python/cpython/pull/17198 ___ Python tracker <https://bugs.python.org/issue38

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17195 ___ Python tracker <https://bugs.python.org/issu

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38823> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
Brandt Bucher added the comment: How do others feel about the creation of a new private API? It would keep these diffs smaller and ease refactoring... and it would probably be good to have around anyways: /* Like PyModule_AddObject, but steals o on success AND failure. */ int

[issue38823] Improve stdlib module initialization error handling.

2019-11-16 Thread Brandt Bucher
New submission from Brandt Bucher : Many of the C stdlib modules can benefit from improved error handling during initialization. I've now had two PRs where the authors had reference leaks on error conditions, but defended their decisions by pointing to examples of similar idioms all over

[issue11354] argparse: nargs could accept range of options count

2019-11-13 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue11354> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-13 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue25866> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38328] Speed up the creation time of constant list and set literals.

2019-11-11 Thread Brandt Bucher
Change by Brandt Bucher : -- title: Speed up the creation time of constant list literals. -> Speed up the creation time of constant list and set literals. ___ Python tracker <https://bugs.python.org/issu

[issue38328] Speed up the creation time of constant list literals.

2019-11-11 Thread Brandt Bucher
Brandt Bucher added the comment: I have created a new patch (PR 17114) that performs this optimization directly in the compiler, rather than the peephole optimizer. I think I like the new one better. -- ___ Python tracker <ht

[issue38328] Speed up the creation time of constant list literals.

2019-11-11 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16621 pull_request: https://github.com/python/cpython/pull/17114 ___ Python tracker <https://bugs.python.org/issue38

[issue38764] Deterministic globbing.

2019-11-11 Thread Brandt Bucher
Brandt Bucher added the comment: I'm not sure listdir and walk should be sorted, for the reasons Raymond mentioned. And I was actually surprised to learn today that pathlib.Path.glob doesn't use the glob module internally. Was there some reasoning behind this decision? Separator handling

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-11-10 Thread Brandt Bucher
Brandt Bucher added the comment: I went ahead and opened a PR, since it's been a month. -- ___ Python tracker <https://bugs.python.org/issue38438> ___ ___ Pytho

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-11-10 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16612 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17106 ___ Python tracker <https://bugs.python.org/issu

[issue38764] Deterministic globbing.

2019-11-10 Thread Brandt Bucher
Brandt Bucher added the comment: I disagree somewhat with the assessment that glob provides "thin" access to OS services. It is composed of a few low-level utilities, but it exposes them through what I consider to be a fairly high-level, abstract, friendly interface that (

[issue38764] Deterministic globbing.

2019-11-10 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16611 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17105 ___ Python tracker <https://bugs.python.org/issu

[issue38764] Deterministic globbing.

2019-11-10 Thread Brandt Bucher
New submission from Brandt Bucher : This has been discussed before, but we now have examples in the news of glob's non-deterministic behavior causing some real headaches for hundreds of people in the scientific community. After some cursory discussion (https://discuss.python.org/t/a-code

[issue15243] Misleading documentation for __prepare__

2019-11-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue15243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected

2019-11-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue9495> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38637] fix GROWTH_RATE comments bug

2019-10-30 Thread Brandt Bucher
Brandt Bucher added the comment: This PR was closed as invalid for the same reasons Steven mentioned above. -- nosy: +brandtbucher resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue38560] Disallow iterable argument unpacking after a keyword argument?

2019-10-29 Thread Brandt Bucher
Brandt Bucher added the comment: I’ve thought about it and I’m +1 on DeprecationWarning in 3.9 and SyntaxError in 3.10. Removing any type of legal function call is tricky, but this is such obscure, sneaky syntax that it’s likely an accident/bug if it does pop up (that’s how I discovered

[issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables

2019-10-25 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue38580> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38560] Allow iterable argument unpacking after a keyword argument?

2019-10-23 Thread Brandt Bucher
Brandt Bucher added the comment: I've found one occurrence of this in the CPython codebase, in test_ast.py. Basically it makes sure that the following expression parses and compiles correctly: f(1,2,c=3,*d,**e) I doubt that this is to protect against regressions in this specific syntax

[issue38560] Allow iterable argument unpacking after a keyword argument?

2019-10-22 Thread Brandt Bucher
New submission from Brandt Bucher : Calls of the form f(name=value, *args) are currently legal syntax. The resulting argument binding is awkward, and almost never does what you want/expect it to: >>> def f(x, y, z): ... print(x, y, z) ... >>> f(x=0, *(1, 2)) Traceback

[issue38328] Speed up the creation time of constant list literals.

2019-10-21 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16423 pull_request: https://github.com/python/cpython/pull/16878 ___ Python tracker <https://bugs.python.org/issue38

[issue38436] Improved performance for list addition.

2019-10-16 Thread Brandt Bucher
Brandt Bucher added the comment: I'm going to go ahead and close this, since the payoff doesn't seem to be worth the effort. Thanks for the benchmarking and feedback! -- resolution: -> rejected stage: patch review -> resolved status: open -&g

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: I went ahead and ran an instrumented build on some random production code (mostly financial data processing), just because I was curious: BINARY_ADD ops: 3,720,776 BINARY_ADD ops with two lists: 100,452 (2.7% of total) BINARY_ADD with new fast path: 26,357

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: Serhiy, here are the better performance measurements: $ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # list-add . Mean +- std dev: 17.3 ns +- 0.3 ns $ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # master

[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-10-11 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16298 pull_request: https://github.com/python/cpython/pull/16705 ___ Python tracker <https://bugs.python.org/issue36

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: ...and obviously the gains are more pronounced for more/longer lists. In general I'm not married to this change, though. If the consensus is "not worth it", I get it. But it seems like too easy of a

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks, Pablo, for providing that. So the changes look like mostly a wash on these benchmarks. Serhiy: I do not see any significant change in + operator timing on my machine (again, just a rough test): $ ./python.exe -m timeit -s z=0 z+0 # master

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: For backward compatibility with 2 metavars, the two-name form should still be possible. Just pass metavar=("FOO", "FOO"). -- ___ Python tracker <https://bug

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: I’m happy to write one. This seems like a pretty straightforward fix. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38422] Clarify docstrings of pathlib suffix(es)

2019-10-10 Thread Brandt Bucher
Change by Brandt Bucher : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue38422> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-10 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue38438> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-10-10 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: -16290 ___ Python tracker <https://bugs.python.org/issue36229> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38436] Improved performance for list addition.

2019-10-10 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16289 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16705 ___ Python tracker <https://bugs.python.org/issu

[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-10-10 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16290 pull_request: https://github.com/python/cpython/pull/16705 ___ Python tracker <https://bugs.python.org/issue36

[issue38436] Improved performance for list addition.

2019-10-10 Thread Brandt Bucher
New submission from Brandt Bucher : The attached PR adds a fast path for BINARY_ADD instructions involving two lists, where the left list has a refcount of exactly 1. In this case, we instead do a PySequence_InPlaceConcat operation. This has the affect of avoiding quadratic complexity

[issue38109] Missing constants in Lib/stat.py

2019-10-08 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue38109> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38307] Provide Class' end line in readmodule module

2019-10-08 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue38307> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38373] List overallocation strategy

2019-10-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue38373> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Brandt Bucher
Brandt Bucher added the comment: ...unless you'd prefer that I add them to this PR. But I think it's a better idea to add and review them separately. -- ___ Python tracker <https://bugs.python.org/issue38

[issue34938] Fix mimetype.init() to account for from import

2019-10-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker <https://bugs.python.org/issue34938> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Brandt Bucher
Brandt Bucher added the comment: Yes, I was thinking about that (and BUILD_CONST_KEY_MAP as well). I'll open another PR with those as soon as this one is in. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38328] Speed up the creation time of constant list literals.

2019-09-30 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16087 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16498 ___ Python tracker <https://bugs.python.org/issu

[issue33325] Optimize sequences of constants in the compiler

2019-09-30 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16086 pull_request: https://github.com/python/cpython/pull/16498 ___ Python tracker <https://bugs.python.org/issue33

[issue38328] Speed up the creation time of constant list literals.

2019-09-30 Thread Brandt Bucher
New submission from Brandt Bucher : The attached PR contains a small change to the peephole optimizer that converts sequences of: LOAD_CONST(a), LOAD_CONST(b), ..., BUILD_LIST(n) to LOAD_CONST((a, b, ...)), BUILD_LIST_UNPACK(1) The improvement quickly becomes significant for lists larger

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16051 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16467 ___ Python tracker <https://bugs.python.org/issu

[issue38310] Opcode predictions for asserts, class definitions, and some calls.

2019-09-28 Thread Brandt Bucher
New submission from Brandt Bucher : This patch adds four new opcode predictions: BUILD_MAP_UNPACK_WITH_CALL -> CALL_FUNCTION_EX: - Emitted whenever more than one map of **kwargs is unpacked into a call. - Pair *always* occurs together. LOAD_BUILD_CLASS -> LOAD_CONST: - Emitted wh

[issue26868] Document PyModule_AddObject's behavior on error

2019-09-07 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +15380 pull_request: https://github.com/python/cpython/pull/15725 ___ Python tracker <https://bugs.python.org/issue26

[issue26868] Document PyModule_AddObject's behavior on error

2019-09-06 Thread Brandt Bucher
Brandt Bucher added the comment: It looks like the idiom of calling PyModule_AddObject without Py_DECREF'ing on the error condition (or even checking for it at all) has spread quite a bit since this first reported. I'm preparing a PR to fix the other call sites. -- nosy

<    1   2   3   4   5   6   >