[Python-Dev] Re: PEP 642 v3: Explicit patterns for structured pattern matching

2021-01-10 Thread Paul Sokolovsky
Hello, On Sun, 10 Jan 2021 12:08:05 +1000 Nick Coghlan wrote: [] > PEP 634 doesn't have that feature for class patterns in general, only > for classes like data classes, where the constructor signature is > carefully aligned with the match arguments. You see, if PEP622/PEP634 contained clause

[Python-Dev] Re: unittest of sequence equality

2021-01-10 Thread Steven D'Aprano
On Sat, Jan 09, 2021 at 07:56:24AM -0500, Alan G. Isaac wrote: > This comment misses the key point, which is: > `assertSequenceEqual` should not rely > on behavior that is not ensured for typing.Sequence, > but it currently does. The failure on a numpy array > simply exposes this problem. You are

[Python-Dev] why include cpython/*.h, Need this macro ? # error "this header file must not be included directly"

2021-01-10 Thread junyixie
#ifndef Py_LIMITED_API # define Py_CPYTHON_FILEOBJECT_H # include "cpython/fileobject.h" # undef Py_CPYTHON_FILEOBJECT_H #endif cpython/fileobject.h ``` #ifndef Py_CPYTHON_FILEOBJECT_H # error "this header file must not be included directly" #endif ``` why not use #ifndef #define cpython/f

[Python-Dev] Upcoming 3.7.10 and 3.6.13 Security Releases

2021-01-10 Thread Ned Deily
We are planning to produce the next security-fix rollup releases for Python 3.7.x and 3.6.x on 2021-01-15. The most recent releases for these versions were on 2020-08-17. There has not been a lot of activity for either branch since then. Core developers: if you know of any additional security

[Python-Dev] Re: why include cpython/*.h, Need this macro ? # error "this header file must not be included directly"

2021-01-10 Thread Serhiy Storchaka
10.01.21 09:53, junyixie пише: > #ifndef Py_LIMITED_API > # define Py_CPYTHON_FILEOBJECT_H > # include "cpython/fileobject.h" > # undef Py_CPYTHON_FILEOBJECT_H > #endif > > cpython/fileobject.h > ``` > #ifndef Py_CPYTHON_FILEOBJECT_H > # error "this header file must not be included directly"

[Python-Dev] Extending python's graphlib module

2021-01-10 Thread touqir
It was really good to see Python 3.9 adding the topological sort algorithm. What other algorithms might come next to the graphlib module? I think the basic ones like BFS, DFS, Bellman Ford's shortest path algorithm will be quite useful to have. Let me know if contributions are welcome. Thanks! _