Kound

Results 118 comments of Kound

The function should actually go to `typing` instead of `functools` as so it can be backported to older versions of python.

> We occasionally backport typing-adjacent things from other modules in typing_extensions (`collections.abc.Buffer` and `types.get_original_bases` have been two recent examples), so this isn't, on its own, a great argument for why...

I am wondering if it makes sense to add a `skip_first` argument, to get it properly working when applied to function. See [mypy play](https://mypy-play.net/?mypy=1.2.0&python=3.12&gist=c3b42203864d5a70b65acaef2c8c24d4), [pyright play](https://pyright-play.net/?code=GYJw9gtgBAxmA28CmMAuBLMA7AzgOgEMAjGKdCABzBFSgGEDFjkBYAKFEilQE8L0sAczKVqtABTso0qAEEsPADRSZdbDAKokWTUmVsZUADLotIRvsMAFAuYgBlCiksyAKnyQA1Wy%2BkacqL5QYABuSCDwYAQAJkEgSGGMAPq8TvoAlOxZbADEUAAiSMACSFA4kKU4TjDoxRoY2IplSKXRYDAArhDaqJqYWOxWUAC8UDZ2jijiAERW05lsVgBMI2O2BA7VM8vz7K6r7k7eIDOuu2yuAGLoIAH2YB0gMKWjh162p9e3qPePz%2BdXG4BVy2QRIWivDzHT5A1AgkBg1DnbJ5S7UKAEKAACyQ8AoGKID1o0RQ1E06IA7qYsVAKOtumYcM0kOw8ljUKgKDgAFwAel5AQIMAA1qFwsBIhS8HAILyAI4dJABfo4XkAVgAnEsNQBGAAMAHZeSS4OZUNQcABaKmoLGWul2cHhHDZdgAATFESi0XYJOAsDAFB4SWFFNBOEkBhkofDSQ0iG59EY8GYSAA2lYmvIeABdJrCloUJLFb6JkxmRhpy6MHBIHOravwWvsdJQS0APiTTCIyDTaYY3d7eGHTVcObzXZTPfTmagY5z3JU0mHeFdbA9YS9MV9RQDQZDYYREaXUBjR7jycTA6nvbUWHq2l0acB31%2BTz0Ywn2bzJ4LSCLJYBGWpjhJWrggIqP5sK2HaTqmaYnv2ybwXeD46Foz5fMCoLgk0ywTvOQTXih6i6Oh6YvthCK4Z%2Bo5QQuJ4rmufp7sGZ6CMeUbSOxOAXgmcHTvmhbFrCiaEggDY1iy0Ftp2xHTn28nIBOSl1ouXFQNMWmFKa5IgFAbRKlAWBgLaAjCEQHS0PEqCPFg5ncDisAEAESDRMEIDoIIAiMFAwAdPeDRYFp0zZIYLE2XZxYBTA4j%2BfeV7IQpK50TBclJb2s5juphiGJFIBYM5ATiKpGZ0U08UwAsJ75YVtXRfezG7jxSTYPAPDiAAVBVYBgImAQgE0RC2ImAioGlZSoCAOUyLVmmhWw2RunA%2B48eILVtTwCwsRtWDtSkOGoF14ZNJ1nU8RNY0zdIc1jeth4ca1e0dZ1J1QGdF3VYtbAsR0XJTUgGwNbFBCjVggRQEQiYSlEEPdQZDzTmJvXwJJTZIBNMOaNdUBzTqeB6tk8SJPAKQeOIf0DYDEDA19y2BmxD0RpTANA5V227toWIEPebniKDZDg0N0ORJop3hom2ZNG0HRI5DKNo7Wp3nUzksKBNA043NA0U-98RszF-NDeLR7S4jyDDDLgnvSr4bpF97DE4DpOpEg4hczzzzRA7bAwCmOBMmifUnr9evU0kDJYmA0TiLW8DAE0AtjcLfmi3DZuy8gyMSaMja1pjac43l4J2VA%2BOE997B%2By5TIAEIjSHu5JEkAimM3se4sA6RFzIcfAHgwC9Q2vXiF9hj06tTPiEHeAs-rNOR9HQn-iJ3zDOBioLOFnNYNzvMxyehh94nYMQ1DqewybHFq0oCOZ0g2eo7nUnKzxN8nhrU09zdJcFZNJx9wHr1WeYcgaLxjgQY2703pWwtrAj8H0mb2zXE7ZIrtp7ALnuHcBCxUEu3JvXEAeAPb71wQkZ2ZMnDiEIaPYhu9PZuTISTShbsg60KwWA8EUdvbZCAA) ```python @overload def copy_kwargs(...

The decorator is called `copy_kwargs` and not `copy_and_modify`. So no, it isn't possible to add a new parameter using this the decorator. Note: Using this in class like described by...

As [PR #121693](https://github.com/python/cpython/pull/121693) is becoming stale, I thought it would be a good idea to cycle back to the original issue for discussion. ### My Goal I want to raise...

> Since this decorator would need to be handled specially by type checkers, let's not add it to CPython until there is a corresponding change to [the typing spec](https://typing.readthedocs.io/en/latest/spec/index.html). What...

> If this function _doesn't_ need special handling from type checkers, what is the motivation for adding it to `typing`? > > We have a few existing helpers in `typing`...

> Then I'd suggest you contribute it to useful_types first, and only add it to the standard library after it has actually proven to be widely useful. Actually, I believe...

@JelleZijlstra Happy New year. Did you have some time to look at my arguments?

Thanks for chiming in, cyberw. I didn't find all the results you were looking for even so I looked quite intensively in the past. The sole reason for this MR...