Change by Itay azolay :
--
versions: +Python 3.10, Python 3.11 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue44695>
___
___
Python-bugs-list mailin
New submission from Itay azolay :
Hi,
I noticed that 'asdict' use 'deepcopy' on all fields of the dataclass
recursively.
I believe this behavior can become optional with an argument, and shouldn't be
decided for the user as the deepcopy takes significant am
Itay azolay added the comment:
Hey Felipe! Thanks for stepping in!
I do get your argument.
However, in my opinion, I try to argue the same thing for max or sorted.
"if one wants to use `sorted`, they should make sure their arguments are
comparable".
However, it is not the case, s
Itay azolay added the comment:
Thanks, you have some very good points.
Let my try to address them
* cache functions really are expected to be cheap, but what they really need to
be is *cheaper*. If my computation is expensive enough, I might be okay with
making a less, still somewhat
Itay azolay added the comment:
Yes, you're right.
It's a bad example, I tried to simplify it, and I ended up oversimplifying it.
Real-life cases are of course more complicated.
What I wanted to accomplish, is very similar to the `key` argument in
sorted/min/max/etc..
let my try an
Change by Itay azolay :
--
keywords: +patch
pull_requests: +20499
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21353
___
Python tracker
<https://bugs.python.org/issu
New submission from Itay azolay :
I'd like to add optional argument to lru_cache.
This argument is a user given function that will replace the default behaviour
of creating a key from the args/kwds of the function.
for example:
def my_make_key(my_list):
return my_list[0]
@lru_cach
Change by Itay azolay :
--
pull_requests: +16904
pull_request: https://github.com/python/cpython/pull/17425
___
Python tracker
<https://bugs.python.org/issue31