Coder Social home page Coder Social logo

Python 3.12 Generics about pyupgrade HOT 6 CLOSED

jack-tutor avatar jack-tutor commented on June 3, 2024
Python 3.12 Generics

from pyupgrade.

Comments (6)

asottile avatar asottile commented on June 3, 2024

please spend a few minutes and search the issue tracker next time

from pyupgrade.

jack-tutor avatar jack-tutor commented on June 3, 2024

I looked at the issue tracker prior to posting this and have since looked.

Searching for the terms of type generic 3.12 695 parameter and looking at all open issues - this is the closest issue I can find: #836

It's entirely possible I am still missing this - but short of looking through all the closed issues in the repo - I'm not sure how to find the answer here. If nothing else - linking to the answer here would help someone else who might use the same search terms as me.

from pyupgrade.

asottile avatar asottile commented on June 3, 2024

why not 695 ?

from pyupgrade.

asottile avatar asottile commented on June 3, 2024

ah you did find the duplicate -- great! next time do that first so you don't even need to waste both of our time opening an issue about it

from pyupgrade.

jack-tutor avatar jack-tutor commented on June 3, 2024

Are you saying that the issue I am raising here is a duplicate of #836? That issue is about the new type alias syntax - I am talking about generics (there is overlap, but not complete).

As in this:

def max[T](args: Iterable[T]) -> T:
    ...

class list[T]:
    def __getitem__(self, index: int, /) -> T:
        ...

    def append(self, element: T) -> None:
        ...

This seems to me a distinct concern and feature from what is discussed in 836

from pyupgrade.

asottile avatar asottile commented on June 3, 2024

yes it is an exact duplicate

from pyupgrade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.