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

2021-10-20 Thread Piotr Waszkiewicz
Hi, On Wed, Oct 20, 2021 at 5:44 PM Michael Selik wrote: > On Wed, Oct 20, 2021 at 1:16 AM Piotr Waszkiewicz > wrote: > >> On Wed, Oct 20, 2021 at 2:33 AM Michael Selik wrote: >> >>> In case it saves anyone a couple clicks: >>> https://www.python.org/de

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

2021-10-20 Thread Piotr Waszkiewicz
On Wed, Oct 20, 2021 at 9:39 PM Michael Selik wrote: > > > On Wed, Oct 20, 2021 at 9:18 AM Piotr Waszkiewicz > wrote: > >> Do you think about something along those lines? >> ``` >> phone = book.publisher.owner.phone except AttributeError: None >> ``` >

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

2021-10-18 Thread Piotr Waszkiewicz
Big +1 from me. I've been looking forward to having None-aware operators in Python as I find them a very neat language addition. For me personally the main advantage of having maybe-dot (?.) operator is the ability to express certain logic in a much clearer way, for example: > class

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

2021-10-19 Thread Piotr Waszkiewicz
let me know in that case. Best regards On Tue, Oct 19, 2021 at 1:29 AM Steve Dower wrote: > Okay, I'll let myself get sucked into responding ONE TIME, but only > because you gave me such a nice API to work with :) > > On 10/18/2021 9:11 PM, Piotr Waszkiewicz wrote: > > &g

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

2021-10-20 Thread Piotr Waszkiewicz
Hi, On Wed, Oct 20, 2021 at 2:33 AM Michael Selik wrote: > In case it saves anyone a couple clicks: > https://www.python.org/dev/peps/pep-0463/ > > I also prefer more syntactic help with exceptions, rather than more syntax > emphasizing None's uniqueness. > Me too, but could you provide me an

[Python-Dev] Possible bug in `re` module in Python 3.11?

2022-10-26 Thread Piotr Waszkiewicz
ng from 3.6 (the oldest I've checked). What's more the regex i correctly recognized and does not cause any issues in other regexp implementations, e.g. the online tool https://regex101.com/ Could somebody help me decide whether this is indeed a bug? Best regards, Piotr Waszkiewicz _

[Python-Dev] Re: Possible bug in `re` module in Python 3.11?

2022-10-26 Thread Piotr Waszkiewicz
Thank you very much for your input, I've filled in the bug report: https://github.com/python/cpython/issues/98740 Best regards, Piotr On Wed, Oct 26, 2022 at 6:55 PM Serhiy Storchaka wrote: > 26.10.22 11:17, Piotr Waszkiewicz пише: > > Hi, > > I would like to ask your guidance

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

2022-09-15 Thread Piotr Waszkiewicz
Hi Maarten, I like the suggestion but I'm not sure if the real problem with the PEP505 is the symbol/operator used. Reading through the whole discussion I'm under the impression that the idea of the None value being treated as an indicator of the missing attribute is what prevents this PEP from

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

2022-09-15 Thread Piotr Waszkiewicz
Hi Maarten, I'm sorry for the confusion - it was bad wording on my part. What I really meant was that the problem with the None-aware operator, and the reason why PEP505 has not been accepted for such a long time, is that there's no consensus regarding the need for it (and not necessarily the

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

2022-09-20 Thread Piotr Waszkiewicz
Hi Philipp, That's a really good idea, and I'd really want to see it being implemented. Having said that, I wonder how many people would actually use this concept of "none-representing" objects. In my 10+ years of programming experience I've never seen anybody eager to use more complex structures