Überladene Funktionen in PythonPython

Python-Programme
Anonymous
 Überladene Funktionen in Python

Post by Anonymous »

Ist es möglich, überladene Funktionen in Python zu haben?
In C# würde ich so etwas tun:

Code: Select all

void myfunction (int first, string second)
{
// Some code
}

void myfunction (int first, string second, float third)
{
// Some different code
}
Und wenn ich dann die Funktion aufrufe, würde sie anhand der Anzahl der Argumente zwischen den beiden unterscheiden. Ist es möglich, etwas Ähnliches in Python zu tun?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post