About 51 results
Open links in new tab
  1. What does -> mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · def foo() -> lambda hi: True: "function body" # not a type expressions Beside the first the others have no typing meaning; but it still is valid syntax to hide a lambda definition in the return …

  2. python - Differences between `class` and `def` - Stack Overflow

    What is the main difference between class and def in python? Can a class in python interact with django UI (buttons)?

  3. What is a DEF function for Python - Stack Overflow

    Sep 10, 2013 · I am new to coding Python and I just can't seem to understand what a Def function is! I have looked and read many tutorials on it and I still don't quite understand. Can somebody explain to …

  4. python - What does def main () -> None do? - Stack Overflow

    As is, it does absolutely nothing. It is a type annotation for the main function that simply states that this function returns None. Type annotations were introduced in Python 3.5 and are specified in PEP …

  5. Groovy: what's the purpose of "def" in "def x = 0"?

    Oct 9, 2008 · The def keyword can be removed, and this snippet would produce the same results. So what's the effect of the keyword def ?

  6. python - How to make mypy ignore no-untyped-def error on internal ...

    Nov 19, 2023 · I'm using mypy with disallow-untyped-defs flag so it complains when I create a method that doesn't have type annotation on parameters or return (error: Function is missing a type …

  7. How do you use input function along with def function?

    Jun 9, 2015 · How do you use input function along with def function? Asked 10 years, 10 months ago Modified 1 year, 3 months ago Viewed 107k times

  8. python - How to use "def" with strings - Stack Overflow

    Dec 25, 2013 · I'm relatively new to programming so I just recently got started with experimenting with "def" in python. This is my code and its keeps on telling me the first name hasn't been defined. def …

  9. Using len () and def __len__ (self): to build a class

    Feb 27, 2013 · Just curious, Is there any difference (advantages and disadvantages) between using len () or def __len__ () when I build a class? And which is the best Python style? class foo (object): def

  10. Why am I getting a NoClassDefFoundError in Java?

    I am getting a NoClassDefFoundError when I run my Java application. What is typically the cause of this?