A function or method signature specifies its name, parameter count, parameter datatypes, parameter order, and return datatype. Parameter names are not part of the signature. section 7.6 section 4.3
Same signature, different subclass behavior
Item._cost(regular_price, weight) and OrganicItem._cost(organic_price, weight) have the same signature because their names, parameter counts, and parameter order match; changing parameter names does not prevent overriding. Python normally omits parameter and return datatypes, while statically typed languages include them. section 7.1.1
Use signatures to communicate class design at different levels of detail:
- In a UML class diagram, show each method’s name, parameter datatypes, and return datatype when that detail matters. section 4.3
- Use matching signatures to enable method overriding and runtime polymorphism between superclass and subclass methods. section 7.1.1
- Distinguish overloaded functions by keeping the same name but changing their other signature elements. section 7.6







