This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wlf100220
Recipients wlf100220
Date 2020-12-09.13:39:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607521186.12.0.817710588965.issue42610@roundup.psfhosted.org>
In-reply-to
Content
**Feature**
A similar feature in typescript
```ts
const foo: number = 1
type Foo = typeof foo  // type Foo = number

function bar(x: string): void {

}

type Bar = typeof bar // type Bar = (x: string) => void
```

**Pitch**
The expected way in future python.
```py
from typing import Type
foo: int = 1
Foo = Type[foo]  # equivalent to Foo = int

def bar(x: string) -> None :
    ...
Bar = Type[bar]  # equivalent to Bar = Callable[[str], None]
```
History
Date User Action Args
2020-12-09 13:39:46wlf100220setrecipients: + wlf100220
2020-12-09 13:39:46wlf100220setmessageid: <1607521186.12.0.817710588965.issue42610@roundup.psfhosted.org>
2020-12-09 13:39:46wlf100220linkissue42610 messages
2020-12-09 13:39:46wlf100220create