About 53 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. 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 …

  3. function - what is "def" in Java class - Stack Overflow

    Jan 14, 2021 · I heard about the concept of local variable type inference in java. But it is a concept of Java 10 and I am using java 8. while googling, I find that "def" is used in python and groovy …

  4. python - Why use def main ()? - Stack Overflow

    Oct 28, 2010 · Variables inside def main are local, while those outside it are global. This may introduce a few bugs and unexpected behaviors. But, you are not required to write a main() function and call it …

  5. python calling a def () inside of def () - Stack Overflow

    Aug 1, 2018 · python calling a def () inside of def () Asked 7 years, 8 months ago Modified 3 years, 6 months ago Viewed 32k times

  6. .def files C/C++ DLLs - Stack Overflow

    Jul 21, 2014 · The advantage of def file is that, it helps you to maintain the backword compatibility with the already realsed dlls. i.e it maintains the ordinal numbers for apis. Suppose you add a new api in …

  7. 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 …

  8. How to use the def function in IF or ELSE/ ELIF satement in python?

    Jan 3, 2016 · You need to define your functions first but if you have multiple choices you can store references to functions in a dict then call based on what the user enters, using dict.get with a default …

  9. How can we define a function without using the `def` keyword?

    Apr 7, 2018 · How can we do something similar for functions? That is, how can we define a function without using the def or lambda keywords? What might a pure-python implementation of dehf look …

  10. What does the "yield" keyword do in Python? - Stack Overflow

    Oct 24, 2008 · Note that def ining a function that contains a yield keyword is not the only way to create a generator; it's just the easiest way to create one. For more accurate information, read about iterator …