A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-September/146261.html below:

[Python-Dev] Do PEP 526 type declarations define the types of variables or not?

[Python-Dev] Do PEP 526 type declarations define the types of variables or not? [Python-Dev] Do PEP 526 type declarations define the types of variables or not?Chris Angelico rosuav at gmail.com
Tue Sep 6 14:36:27 EDT 2016
On Wed, Sep 7, 2016 at 4:11 AM, Stephen J. Turnbull
<turnbull.stephen.fw at u.tsukuba.ac.jp> wrote:
> Finally, the notion of annotating expressions is incoherent:
>
>     # Annotating (sub)expressions: the more the merrier!
>     (x) : bool = (((y): int + (z): float) / (w): complex): quarternion
>     # Ooh, an expression with no past and no future.  Annotate it!
>     (y + z) / w: quarternion

Can't do that - parsing would become ambiguous.

x = {1:int, 1.5:float, 2+3j:complex}
print(type(x))

ChrisA
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4