[Python-Dev] Re: PEP 505 (None-aware operators) for Python 3.11

2021-10-14 Thread Jeremiah Vivian
I tried to implement this in CPython by modifying a downloaded source code, but I can't seem to fix the problem of the "maybe" operators segfaulting when being used with literal immutables. The maybe-assign/coalesce operators were implemented successfully though.

[Python-Dev] Optimizing literal comparisons and contains

2021-11-27 Thread Jeremiah Vivian
Many operations involving two literals are optimized (to a certain level). So it sort of surprises me that literal comparisons are not optimized and literal contains only convert the right operand to a constant if possible. I'd like to implement optimizations for these especially for the

[Python-Dev] Re: Naming convention for AST types

2021-10-28 Thread Jeremiah Vivian
This is the convention according to my expertise: > PascalCase: subtype of a token type, cannot be used in a `rule_name[type]:` > definition in grammar > lower_snake_case: a token type PascalCase nodes are those used in the functions `_PyAST_*` (or one of the expression contexts), while

[Python-Dev] Re: Naming convention for AST types

2021-10-28 Thread Jeremiah Vivian
Here's a short description: > PascalCase: used in `_PyAST_*` nodes > lower_snake_case: used in `*_ty` nodes ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org

[Python-Dev] Re: Naming convention for AST types

2021-10-28 Thread Jeremiah Vivian
Sorry for the two replies, I didn't think the first one would be sent. ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message

[Python-Dev] Re: Optimizing literal comparisons and contains

2021-11-30 Thread Jeremiah Vivian
The code in the pull request is not updated and cannot be updated (though I seem to have fixed the bugs in the test in my modified CPython build). It won't merge, and I definitely believe it won't pass. ___ Python-Dev mailing list --

[Python-Dev] Re: An unambiguous way of initializing an empty dictionary and set

2022-03-13 Thread Jeremiah Vivian
> s = {} # new empty set > d = {:} # new empty dictionary (the ":" is a reference to key-value pairs) Even though this isn't python-ideas, I just want to suggest having it like this: s = {,} # new empty set d = {} # same syntax for new empty dictionary Instead of the backwards-incompatible change

[Python-Dev] Re: Require a C compiler supporting C99 to build Python 3.11

2022-02-07 Thread Jeremiah Vivian
On Mon, Feb 7, 2022 at 5:11 PM Victor Stinner vstin...@python.org wrote: > I made a change to require C99 "NAN" constant and I'm was > asked to update the PEP 7 to clarify the C subset is needed to build > Python 3.11. What if it was built with MSVC which is usually just C90?

[Python-Dev] Re: [RELEASE] The last Python 3.11 alpha (3.11.0a7) is available - Prepare for beta freeze

2022-04-06 Thread Jeremiah Vivian
> Among the new major new features and changes so far: This section of major new features should've included the addition of atomic groups/possessive matching into the `re` module. This is a boost in regex matching performance when the pattern doesn't need any backtracking.

[Python-Dev] Re: [RELEASE] The last Python 3.11 alpha (3.11.0a7) is available - Prepare for beta freeze

2022-04-06 Thread Jeremiah Vivian
> Can you provide a bpo number, please? bpo-433030 ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at