Python Forum

Full Version: what means in Python the "->"?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Here the code section in Python :

https://refactoring.guru/design-patterns...on/example

uses "->" like in a function declaration... what is mean ... is method ??? Is it Python 3? the -> isn't for PHP OOP usage, what means in Python the "->"?
This is for static type checker mypy.
It helps your IDE to warn you about wrong types.
[attachment=694][attachment=695]