[issue44695] asdict use deep copy to dataclass instances

2021-07-21 Thread Itay azolay
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

[issue44695] asdict use deep copy to dataclass instances

2021-07-21 Thread Itay azolay
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

[issue41220] add optional make_key argument to lru_cache

2020-07-11 Thread Itay azolay
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

[issue41220] add optional make_key argument to lru_cache

2020-07-08 Thread Itay azolay
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

[issue41220] add optional make_key argument to lru_cache

2020-07-07 Thread Itay azolay
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

[issue41220] add optional make_key argument to lru_cache

2020-07-06 Thread Itay azolay
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

[issue41220] add optional make_key argument to lru_cache

2020-07-06 Thread Itay azolay
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

[issue31821] pause_reading() doesn't work from connection_made()

2019-12-01 Thread Itay azolay
Change by Itay azolay : -- pull_requests: +16904 pull_request: https://github.com/python/cpython/pull/17425 ___ Python tracker <https://bugs.python.org/issue31