There are at least three existing ways to already do this.
(foo["bar"]
["baz"]
["eggs"]
["spam"]) = 1
foo["bar"][
"baz"][
"eggs"][
"spam"] = 1
foo["bar"]\
["baz"]\
["eggs"]\
["spam"] = 1
I think the first
I believe this would make the code more legible. Serhiy's take is very
confusing to me (I get it, but don't think one should write like to get this
behavior).
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to pytho
Conceivably. I know I've had cases where this would be helpful. (But
on the other hand, it's not *that* hard to write your own persistent
cache for your specific use case if you need it).
I think this is a case where someone should just create a PR and
submit it. No need for a big debate, the core
Would it be desirable to save the state of functools.cache between program
executions? For example, by providing cache_state property on the cache
that is pickle-able.___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email
Op 24/05/2022 om 18:46 schreef Chris Angelico:
(foo["bar"]
["baz"]
["eggs"]
["spam"] = 1)
Not for assignment, unfortunately. And you can't cheat with := either,
since only simple names are permitted.
This would work:
(foo["bar"]
["baz"]
["eggs"]
["spam"]) =
On Wed, 25 May 2022 at 01:08, Jeremiah Paige wrote:
>
> While that formatting does look nice, this would be a huge change to the
> parser just to allow a new formatting style. Right now lines are only
> logically joined if they appear between a pair of () [] or {}, or if the line
> ends in a \.
On Tue, 24 May 2022 at 15:42, Jan Costandius wrote:
>
> I think that it would be beneficial for PEP 8 conformance, in the case of
> large nested dicts, if one were able to separate dict indices by a newline.
> What I mean is shown below:
>
> foo["bar"]
> ["baz"]
> ["eggs"]
> ["spa
While that formatting does look nice, this would be a huge change to the
parser just to allow a new formatting style. Right now lines are only
logically joined if they appear between a pair of () [] or {}, or if the
line ends in a \. Besides the complication of joining lines under new
circumstances
I think that it would be beneficial for PEP 8 conformance, in the case of large
nested dicts, if one were able to separate dict indices by a newline. What I
mean is shown below:
foo["bar"]
["baz"]
["eggs"]
["spam"] = 1
___
Python-ideas m
On Tue, 24 May 2022 at 23:03, wrote:
>
> seek() and tell() works with opaque values, called cookies.
> This is close to low level details, but it is not pythonic.
> (Non-pythonic and non-portable behaviour)
> Currently feeding seek() with wrong values could lead to unexpected behaviour.
> There sh
seek() and tell() works with opaque values, called cookies.
This is close to low level details, but it is not pythonic.
(Non-pythonic and non-portable behaviour)
Currently feeding seek() with wrong values could lead to unexpected behaviour.
There should be a safer abstraction to these two basic fun
11 matches
Mail list logo