[issue42128] Structural Pattern Matching (PEP 634)

2021-02-27 Thread Daniel Moisset
Change by Daniel Moisset : -- pull_requests: +23450 pull_request: https://github.com/python/cpython/pull/24664 ___ Python tracker <https://bugs.python.org/issue42

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-27 Thread Daniel Moisset
Daniel Moisset added the comment: Thanks @xtreak, I'll make some changes in these sections too. The docs are coming along well, there's still some refinement to do in the compound statements section (it's there, but looks to big), I'll submit a draft PR during the weekend so interested

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-20 Thread Daniel Moisset
Daniel Moisset added the comment: Note: I will NOT write something for "What's New in 3.10" seeing that's in progress -- ___ Python tracker <https://bugs.python.o

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-20 Thread Daniel Moisset
Daniel Moisset added the comment: Fyi, I'm looking into the documentation. I think I can have something basic for the middle of this week, so it should be ok for March 1st. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-09 Thread Daniel Moisset
Daniel Moisset added the comment: @Ken: I've invited you to the repo. For tracking the WIP, https://github.com/dmoisset/cpython/tree/patma-docs Do you want to see if you can base the reference/compound_stmts.rst changes in PEP 634? I'll try to fit a variant of the Appendix A of PEP 636

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-09 Thread Daniel Moisset
Daniel Moisset added the comment: Hey Ken, I was about to take on this myself, but I wouldn't mind a bit of help. Your list seems ok, I would add to it a section about PM in the python tutorial (which was explicitly mentioned in the SC acceptance notice). Regarding the grammar, I believe

[issue33270] tags for anonymous code objects should be interned

2018-04-12 Thread Daniel Moisset
New submission from Daniel Moisset <dmois...@machinalis.com>: In compile.c, some strings are created to be used as name of anonymous code objects: "", "", "", "", "" and "". Only the first two of those are interned

[issue28386] Improve documentation about tzinfo.dst(None)

2016-10-07 Thread Daniel Moisset
New submission from Daniel Moisset: The datetime module documentation[1] describes the tzinfo.dst method with a single "dt" argument without being too explicit about possible values for it. The implication is that dt should be a datetime object, but the implementation of tim

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-14 Thread Daniel Moisset
Daniel Moisset added the comment: As a description of the idea I'm attaching a rough patch with an implementation. Some tests fail because of the following: 1) I didn't find a good place to register the Buffer ABC for mmap.mmap, and array.mmap; the modeules themselves are C extensions

[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-13 Thread Daniel Moisset
Daniel Moisset added the comment: OK. Just to give an obvious example of a place where this would be useful for annotations is in the argument for the memoryview() builtin (currently declared with "# TODO arg can be any obj supporting the buffer protocol" in the standard library

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-13 Thread Daniel Moisset
Daniel Moisset added the comment: Thanks for the feedback. Just for the context, I opened this issue also based on this email: http://permalink.gmane.org/gmane.comp.python.devel/156411 Probably there are two different discussions to have here: 1) Is the "Buffer" a useful ABC to

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-12 Thread Daniel Moisset
Changes by Daniel Moisset <dmois...@machinalis.com>: -- components: +Library (Lib) type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-12 Thread Daniel Moisset
New submission from Daniel Moisset: The buffer protocol is a low level C protocol, but even if it doesn't expose a specific python API, it's currently not possible to say "this object implements the buffer protocol" in Python This might be useful for some applications, includi