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/151448.html below:

[Python-Dev] Is static typing still optional?

[Python-Dev] Is static typing still optional? [Python-Dev] Is static typing still optional?MRAB python at mrabarnett.plus.com
Fri Dec 22 16:18:20 EST 2017
On 2017-12-22 21:02, Mike Miller wrote:
> 
> On 2017-12-22 12:15, Chris Barker wrote:
>> Would it be crazy to bring typing.Any into the builtin namespace?
>> 
>> @dataclass:
>>      a: Any
>>      b: Any = 34
>>      c: int = 0
>> 
>> That reads pretty well to me....
>   > And having Any available in the built in namespace may help in other cases where
> 
> There is already an "any" function in the builtins.  It looks fine but not sure
> how it will interact with type checkers.
> 
> The "dataclass.Data" idea mentioned in a sibling thread is good alternative,
> though just wordy enough to make ... a shortcut.
> 
The function is "any", the type is "Any", and "any" != "Any", although I 
wonder how many people will be caught out by that...
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