Site Tools


python:overloading

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
python:overloading [2024/12/16 07:37] – Nielspython:overloading [2024/12/16 07:42] (current) – [Overload in typing library] Niels
Line 1: Line 1:
 +====== Overloading ======
  
 +===== Single dispatch =====
 +
 +[[https://peps.python.org/pep-0443/ | PEP 443 – Single-dispatch generic functions]]
 +
 +
 +===== Overload in typing library  =====
 +
 +// Is for type checking only, the actual implementation is still just done in one function. I guess these days since you can define multiple input types and return types with type hints i guess this decorator may be considered obsolete.//
 +
 +[[https://docs.python.org/3/library/typing.html#typing.overload | Overload (python docs)  ]]