約 56,900 件の結果
リンクを新しいタブで開く
  1. Overloaded functions in Python - Stack Overflow

    Is it possible to have overloaded functions in Python? In C# I would do something like: void myfunction (int first, string second) { // Some code } void myfunction (int first, string second, f...

  2. How do I use method overloading in Python? - Stack Overflow

    2012年4月18日 · 192 It's method overloading, not method overriding. And in Python, you historically do it all in one function:

  3. class - Python function overloading - Stack Overflow

    2016年1月1日 · The act of creating such alternative functions for compile-time selection is usually referred to as overloading a function. (Wikipedia) Python is a dynamically typed language, so the …

  4. Decorator for overloading in Python - Stack Overflow

    2011年12月28日 · So the logical way to implement overloading in Python is to implement a wrapper that uses both the declared name and the parameter types to resolve the function.

  5. How to do function overloading in Python? - Stack Overflow

    2022年12月1日 · I want to implement function overloading in Python. I know by default Python does not support overloading. That is what I am asking this question. I have the following code: def parse(): …

  6. Method overloading for different argument type in python

    2014年8月17日 · The overloading syntax you are looking for can be achieved using Guido van Rossum's multimethod decorator. Here is a variant of the multimethod decorator which can decorate class …

  7. python - How to overload __init__ method based on argument type ...

    I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list. What's your technique for doing this? Do you just check the type by looking …

  8. Python function overloading recommended approach

    python function oop type-hinting constructor-overloading edited Jun 7, 2022 at 15:35 mkrieger1 24.2k 7 68 84

  9. Python: Can subclasses overload inherited methods? - Stack Overflow

    2010年3月8日 · Python: Can subclasses overload inherited methods? Asked 15 years, 9 months ago Modified 15 years, 9 months ago Viewed 19k times

  10. types - Function Overloading in python - Stack Overflow

    2023年2月2日 · Python does not support overloading. The best that you can do is remove any type identifiers from the arguments and use if-else statements to change the function of the method …