[Python-Dev] Critique of PEP 622 (Structural Pattern Matching)
Hi all, I've written up a critique of PEP 622. Rather than dump a 2000 line email on you all, I've made a git repo. https://github.com/markshannon/pep622-critique If you have any corrections or additions to suggest, feel free to submit a PR. If you'd rather not submit a PR, for any reason, just send me an email. Cheers, Mark. ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/O7INCIORKHVWHRRIBEPWYOGMZN64NABO/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Critique of PEP 622 (Structural Pattern Matching)
On Sat, Aug 15, 2020 at 12:32 AM Mark Shannon wrote: > > Hi all, > > I've written up a critique of PEP 622. > Rather than dump a 2000 line email on you all, I've made a git repo. > > https://github.com/markshannon/pep622-critique > I started reading it. You're saying the same things that everyone else has said, so I stopped reading. Do you have anything new to add to the discussion, or is this 2000 lines of rehash? ChrisA ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/MVNBDQDYFOLEU3PQ5OFP25T7VACUZOL3/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] f_localsplus[0] == NULL in super_init_without_args()
(I'm far from certain this is the correct place for this message. Maybe I
should have opened a case on bpo instead?)
I got far behind on my register instruction set stuff and in the interim
the ground shifted underneath me. I'm still working to try and get the test
suite to pass (modulo test_ssl, which I expect to fail on Ubuntu 20.04 for
the time being).
In trying to track down where my code differs from the main/3.10 branch, I
was looking at the super_init_without_args() function in typeobject.c. I'm
puzzled by this chunk of code near the top:
PyObject *obj = f->f_localsplus[0];
Py_ssize_t i, n;
if (obj == NULL && co->co_cell2arg) {
/* The first argument might be a cell. */
n = PyTuple_GET_SIZE(co->co_cellvars);
for (i = 0; i < n; i++) {
if (co->co_cell2arg[i] == 0) {
PyObject *cell = f->f_localsplus[co->co_nlocals + i];
assert(PyCell_Check(cell));
obj = PyCell_GET(cell);
break;
}
}
}
More specifically, the test for f->f_localsplus[0] being NULL seems odd. I
can understand that there might not be any local variables, but there is no
test for co->co_nlocals == 0. Since we don't know how many locals there
might be, if there were none, wouldn't a reference to a cell variable or
free variable occupy the first slot (assuming there are any)? I guess I'm
confused about what the obj == NULL term in the if statement's expression
is doing for us.
On a (maybe not) related note, there is a comment further down in
super_init():
/* Call super(), without args -- fill in from __class__
and first local variable on the stack. */
I'm not seeing where the first local variable on the stack is used to fill
anything in, certainly not within the block guarded by the type == NULL
expression.
Skip
___
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/FOCMYF53HVGTCE4GA3BFVA6ASZEQ2THF/
Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Summary of Python tracker Issues
ACTIVITY SUMMARY (2020-08-07 - 2020-08-14)
Python tracker at https://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open7623 (+25)
closed 45673 (+26)
total 53296 (+51)
Open issues with patches: 3108
Issues opened (40)
==
#33786: @asynccontextmanager doesn't work well with async generators
https://bugs.python.org/issue33786 reopened by ned.deily
#41505: asyncio.gather of large streams with limited resources
https://bugs.python.org/issue41505 opened by kamadorueda
#41506: Inclusion or documentation of extended with syntax in 3.9
https://bugs.python.org/issue41506 opened by asmeurer
#41507: Use utf-8 in "Reading and Writing Files" tutorial.
https://bugs.python.org/issue41507 opened by inada.naoki
#41509: ntpath.relpath behaves differently on Windows with trailing sp
https://bugs.python.org/issue41509 opened by jaraco
#41510: Mentions of pdb.set_trace() in library/functions and library/s
https://bugs.python.org/issue41510 opened by Maciej Olko
#41513: Scale by power of two in math.hypot()
https://bugs.python.org/issue41513 opened by rhettinger
#41515: typing.get_type_hints generates KeyError
https://bugs.python.org/issue41515 opened by eric.fahlgren
#41516: venv activate scripts do not pass ShellCheck
https://bugs.python.org/issue41516 opened by user93448
#41517: Able to subclass enum with members by using multiple inheritan
https://bugs.python.org/issue41517 opened by talsuk5
#41519: `pkgutil.get_data` causes future imports of children modules t
https://bugs.python.org/issue41519 opened by cnezin
#41521: Replace whitelist/blacklist with allowlist/denylist
https://bugs.python.org/issue41521 opened by vstinner
#41522: IDLE: configdialog tab icons
https://bugs.python.org/issue41522 opened by epaine
#41523: functools.cached_property does not satisfy the property check
https://bugs.python.org/issue41523 opened by Bernat Gabor
#41524: PyOS_mystricmp advances pointers too far
https://bugs.python.org/issue41524 opened by wmeehan
#41525: Python '--help' has corrupted text.
https://bugs.python.org/issue41525 opened by WildCard65
#41526: Python 3.9.0rc1 "setup successful" dialog box overflow
https://bugs.python.org/issue41526 opened by PeterL777
#41527: smart quotes in Lib/pydoc_data/topics.py file
https://bugs.python.org/issue41527 opened by xtreak
#41528: Use math module in turtle
https://bugs.python.org/issue41528 opened by TrangOul
#41529: Unable to compile 3.0b3 on Ubuntu systems: Fatal Python error:
https://bugs.python.org/issue41529 opened by ajung
#41530: zoneinfo: ZoneInfo raises IsADirectoryError instead of ZoneInf
https://bugs.python.org/issue41530 opened by josh.ja.butt
#41531: Python 3.9 regression: Literal dict with > 65535 items are one
https://bugs.python.org/issue41531 opened by hroncok
#41533: Bugfix: va_build_stack leaks the stack if do_mkstack fails
https://bugs.python.org/issue41533 opened by tontinton
#41534: argparse : allow_abbrev behavior between 3.7 and 3.8
https://bugs.python.org/issue41534 opened by r1kk3r
#41535: platform win32_ver produces incorrect value for release on Win
https://bugs.python.org/issue41535 opened by jvm3487
#41536: pathlib's Path("NUL:").resolve() throws an error on windows
https://bugs.python.org/issue41536 opened by phillmac
#41538: Allow customizing python interpreter in venv.EnvBuilder
https://bugs.python.org/issue41538 opened by abbec
#41539: print blocks with multiprocessing and buffered output
https://bugs.python.org/issue41539 opened by moi90
#41540: Test test_maxcontext_exact_arith (_decimal) consumes all memor
https://bugs.python.org/issue41540 opened by T.Rex
#41541: Make pty.spawn set window size
https://bugs.python.org/issue41541 opened by soumendra
#41543: contextlib.nullcontext doesn't work with async context manager
https://bugs.python.org/issue41543 opened by tomgrin10
#41544: multiprocessing.dummy.Process lacks daemon parameter
https://bugs.python.org/issue41544 opened by moi90
#41545: gc API requiring matching number of gc.disable - gc.enable cal
https://bugs.python.org/issue41545 opened by Yonatan Goldschmidt
#41546: pprint() gives exception when ran from pythonw
https://bugs.python.org/issue41546 opened by luizeldorado
#41548: Tk Window rendering on macOS Big Sur
https://bugs.python.org/issue41548 opened by roger.meier
#41549: IDLE leaks `_` into hint box
https://bugs.python.org/issue41549 opened by wyz23x2
#41550: SimpleQueues put blocks if feeded with strings greater than 2*
https://bugs.python.org/issue41550 opened by rgrewe
#41551: test.support has way too many imports in libregrtest
https://bugs.python.org/issue41551 opened by thatiparthy
#41552: uuid.uuid1() on certain Macs does not generate unique IDs
https://bugs.python.org/issue41552 opened by terrygreeniaus
#41553: encoded-word abused for header line folding causes RFC 2047 vi
htt
[Python-Dev] Re: Critique of PEP 622 (Structural Pattern Matching)
On Sat, Aug 15, 2020 at 12:36:25AM +1000, Chris Angelico wrote: > Do you have anything new to add to the discussion, or is this 2000 > lines of rehash? Having a summary of objections/critiques in one place is far better than expecting people to wade through multiple huge threads. I've lost count... is the number of emails in this discussion more or less than a googolplex? *wink* -- Steven ___ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/IN6KJ2V3KYLSTKAHVB5TRN3VXCEKRU5D/ Code of Conduct: http://python.org/psf/codeofconduct/
