Saul Shanabrook added the comment:
Ah, I see that to represent a negative 4 byte signed integer as an arg, we
actually do need the 4 instructions, since each is a byte, to get the most
significant bit to a 1?
I wasn't able to find anything anywhere which says if the bytecode shou
Saul Shanabrook added the comment:
I added a patch to make `dis` work with the overflow format.
I am looking into why the bytecode is emitted like this in the first place now.
I see that currently, Python is trying to write a negative bytecode arg for the
JUMP_ABSOLUTE and `instrsize` is
Change by Saul Shanabrook :
--
keywords: +patch
pull_requests: +29445
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31285
___
Python tracker
<https://bugs.python.org/issu
New submission from Saul Shanabrook :
I noticed that in Python 3.10, and also in main, a certain control flow
construct produces some very odd bytecode (showing on main but same on python
3.10 tags):
```
./python.exe -c 'import dis; dis.dis("while not (a < b < c): pass&qu
Saul Shanabrook added the comment:
Thanks Éric!
Do you think it would make sense to add the future flags as well to the inspect
flags documentation
(https://docs.python.org/3/library/inspect.html#code-objects-bit-flags) and to
the dis.pretty_flags
Saul Shanabrook added the comment:
Actually, keeping this open.
I am still unclear if this is expected behavior or not, but I do notice that
the dis module is unable to read the flag when the annotations future is
imported.
For example `dis.pretty_flags(compile("from __future__ i
Saul Shanabrook added the comment:
I am closing this because, I realized I was unclear on whether the future flags
end up as code flags. I thought we were just missing this one, but then
realized that none of the other future flags are documented either.
I had found a flag that was not
New submission from Saul Shanabrook :
The CO_FUTURE_ANNOTATIONS code flag was added in Python 3.7 I believe in this
PR https://github.com/python/cpython/pull/4390.
However, it does not appear in dis's COMPILER_FLAG_NAMES map and so is not
documented in inspect or pretty printed.
I be
Changes by Saul Shanabrook :
Added file: http://bugs.python.org/file38938/patch.diff
___
Python tracker
<http://bugs.python.org/issue23864>
___
___
Python-bugs-list mailin
Changes by Saul Shanabrook :
Removed file: http://bugs.python.org/file38937/patch.diff
___
Python tracker
<http://bugs.python.org/issue23864>
___
___
Python-bugs-list m
Changes by Saul Shanabrook :
Added file: http://bugs.python.org/file38937/patch.diff
___
Python tracker
<http://bugs.python.org/issue23864>
___
___
Python-bugs-list mailin
Changes by Saul Shanabrook :
Removed file: http://bugs.python.org/file38935/patch.diff
___
Python tracker
<http://bugs.python.org/issue23864>
___
___
Python-bugs-list m
Saul Shanabrook added the comment:
I have added a failing test to based on the first example, of a class that
provides the necessary methods, but fails to be an instance of Sequence.
--
keywords: +patch
nosy: +saulshanabrook
Added file: http://bugs.python.org/file38935/patch.diff
13 matches
Mail list logo