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/2017-December/151356.html below:

[Python-Dev] Is static typing still optional?

[Python-Dev] Is static typing still optional? [Python-Dev] Is static typing still optional?Nick Coghlan ncoghlan at gmail.com
Mon Dec 18 14:38:50 EST 2017
On 19 Dec. 2017 7:00 am, "Chris Barker" <chris.barker at noaa.gov> wrote:



Are there other options??

plain old:

@dataclass
class C:
    a = 1
    b = 1.0

would work, though then there would be no way to express fields without
defaults:


The PEP already supports using "a = field(); b = field()" (etc) to declare
untyped fields without a default value.

This annotation free spelling may not be clearly covered in the current
module docs, though.

Cheers,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171219/a65f1a79/attachment.html>
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