Typing, how come that :int is not ensuring int parameter?

DL Neil PythonList at DancesWithMice.info
Thu Jun 11 18:03:48 EDT 2020


On 12/06/20 9:32 AM, zljubisic at gmail.com wrote:
> OK, as I can see nothing is enforced but I can use mypy and tests for the purpose.

Exactly! Well done - Python uses 'duck typing' and thus when the Typing 
module was added, it became an option. As mentioned elsewhere, it 
provides "hints" at 'compile time'.


> As I am using pycharm, looks like I need a plugin for mypy.
> There are two of them out there:
> non official: https://plugins.jetbrains.com/plugin/11086-mypy
> and official: https://plugins.jetbrains.com/plugin/13348-mypy-official-
> 
> Do you have any experience with any of these plugins?
> Please share your opinion.

I don't have a competent opinion for the current Pycharm, but hope that 
others will answer.

TBH I'd be surprised if it doesn't come 'baked in'.
-- 
Regards =dn


More information about the Python-list mailing list