IMO, there're lots of use cases in parsing related stuffs, which requires
rindex a lot, say, when you have generated a tokenizer which might across
multiple lines:
line 8: X """
line 9:
line 10: """
In this case, we need to extract 2 tokens X and , a multiline whitespace
string. After getting
>
>
> -- Forwarded message --
> From: Martin Bammer
> To: python-ideas@python.org
> Cc:
> Bcc:
> Date: Sat, 1 Sep 2018 09:47:04 +0200
> Subject: [Python-ideas] Add recordlcass to collections module
> Hi,
>
> what about adding recordclass
> (https://bitbucket.org/intellimath/recordc
.
Back to the topic, this thread seems to be closed now, and in my opinion
`:=` could be synthetically the best.
2018-04-17 15:11 GMT+08:00 Mikhail V :
> On Tue, Apr 17, 2018 at 6:09 AM, Thautwarm Zhao
> wrote:
>
> >
> > > 3) "target ? expr" (where ? is some o
> We have ways of cheating a bit if we want to reinterpret the semantics
> of something that nevertheless parses cleanly - while the parser is
> limited to single token lookahead, it's straightforward for the
> subsequent code generation stage to look a single level down in the
> parse tree and se
ference.com/w/cpp/algorithm/inclusive_scan
>
> * exclusive_scan() is like inclusive_scan(), but _requires_ an "init"
> argument (which is not returned).
>
> http://en.cppreference.com/w/cpp/algorithm/exclusive_scan
>
> * accumulate() is like Python's functools.reduc
>
>
> 0.
>
> while (items[i := i+1] := read_next_item()) is not None:
> print(r'%d/%d' % (i, len(items)), end='\r')
>
> 1.
>
> while (read_next_item() -> items[(i+1) -> i]) is not None:
> print(r'%d/%d' % (i, len(items)), end='\r')
>
> 2.
>
> while (item := read_next_item()) is not None:
>
> To me, "from" strongly suggests that an element is being obtained from a
container/collection of
> elements. This is how I conceptualize "from module import name": "name"
refers to an object
> INSIDE the module, not the module itself. If I saw
>
> if (match from pattern.search(data)) is not None:
ar:= function() is None else var.method()
>
> Still not bad looking.
>
> On Thu, Apr 12, 2018, 11:01 PM Thautwarm Zhao
> wrote:
>
>>
>> > You're looking at a very early commit there. I suggest looking at the
>> > most recent commits on one of two branch
> You're looking at a very early commit there. I suggest looking at the
> most recent commits on one of two branches:
https://github.com/Rosuav/cpython/blob/statement-local-
variables/Grammar/Grammar
https://github.com/Rosuav/cpython/blob/assignment-
expressions/Grammar/Grammar
> Those are the tw
(because `test` is the top expr).
testlist_comp: (test|star_expr) ( comp_for | 'as' NAME | (','
(test|star_expr))* [','] )
It seems that if we're to support expression assignment, `as` binding
should be declined.
To be honest I feel upset because I think `expr as n
> Makes sense. However, couldn't you prevent that by giving with
> priority over the binding ? As in "(with simple_cm) as value", where
> we consider the "as" as binding operator instead of part of the with
> statement ? Sure, you could commit suicide by parenthesis, but by
> default it'd do exact
f Python-ideas digest..."
>
> Today's Topics:
>
>1. Re: Is there any idea about dictionary destructing?
> (Steven D'Aprano)
>2. Re: Is there any idea about dictionary destructing?
> (Jacco van Dorp)
>3. Re: Start argument for itertools.acc
Your library seems difficult to extract values from nested dictionary, and
when the key is not an identifier it's also embarrassed.
For sure we can have a library using graphql syntax to extract data from
the dict of any schema, but that's not my point.
I'm focused on the consistency of the lan
I'm sorry that I didn't send a copy of the discussions here.
-- Forwarded message ------
From: Thautwarm Zhao
Date: 2018-04-09 1:24 GMT+08:00
Subject: Re: [Python-ideas] Is there any idea about dictionary destructing?
To: "Eric V. Smith"
Thank you, Eric. Your
14 matches
Mail list logo