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

2021-12-18 Thread Bar Harel


Bar Harel  added the comment:

Does this count as a regression or as an unintended bugfix for evaluation order?

https://stackoverflow.com/a/70404659/1658617

--
nosy: +bar.harel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2021-08-30 Thread Mark Shannon


Change by Mark Shannon :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

These changes introduced a regression: bpo-41531 "Python 3.9 regression: 
Literal dict with > 65535 items are one item shorter".

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-28 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-27 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 8a4cd700a7426341c2074a2b580306d2d60ec839 by Mark Shannon in 
branch 'master':
bpo-39320: Handle unpacking of **values in compiler (GH-18141)
https://github.com/python/cpython/commit/8a4cd700a7426341c2074a2b580306d2d60ec839


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-23 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +17527
pull_request: https://github.com/python/cpython/pull/18141

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-23 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 13bc13960cc83dbd1cb5701d9a59ac9b9144b205 by Mark Shannon in 
branch 'master':
bpo-39320: Handle unpacking of *values in compiler (GH-17984)
https://github.com/python/cpython/commit/13bc13960cc83dbd1cb5701d9a59ac9b9144b205


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-13 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-13 Thread Mark Shannon


Change by Mark Shannon :


--
keywords: +patch
pull_requests: +17388
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17984

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-01-13 Thread Mark Shannon


New submission from Mark Shannon :

Currently the unpacking of starred values in arguments and the right hand side 
of assignments is handled in the interpreter without any help from the compiler.
The layout of arguments and values is visible to the compiler, so the compiler 
should do more of the work.

We can replace the complex bytecodes used in unpacking with simpler more 
focused ones.
Specifically the collection building operations 
BUILD_LIST_UNPACK, BUILD_TUPLE_UNPACK, BUILD_SET_UNPACK and 
BUILD_TUPLE_UNPACK_WITH_CALL
can be replaced with simpler, and self-explanatory operations:
LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE

In addition, the mapping operations
BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL
can be replaced with DICT_UPDATE and DICT_MERGE.

DICT_MERGE is like DICT_UPDATE but raises an exception for duplicate keys.

This change would not have much of an effect of performance, as the bytecodes 
listed are relatively rarely used, but shrinking the interpreter is always 
beneficial.

--
components: Interpreter Core
messages: 359901
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Handle unpacking of */** arguments and rvalues in the compiler
type: performance
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com