About 578,000 results
Open links in new tab
  1. mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · It's a function annotation. In more detail, Python 2.x has docstrings, which allow you to attach a metadata string to various types of object. This is amazingly handy, so Python …

  2. What is -> in Python? – Pencil Programmer

    Sep 25, 2021 · The -> (arrow) is used to annotate the return value for a function in Python 3.0 or later. It does not affect the program but is intend to be consumed by other users or libraries as …

  3. What does -> mean in Python function definitions?

    Jun 21, 2024 · In Python, "->" denotes the return type of a function. While Python is dynamically typed, meaning variable types are inferred at runtime, specifying return types can improve …

  4. What does the -> (dash-greater-than arrow symbol) mean in a Python

    Jul 16, 2015 · There is a ->, or dash-greater-than symbol at the end of a python method, and I'm not sure what it means. One might call it an arrow as well. Here is the example: @property def …

  5. What does -> mean in Python function definitions? - W3docs

    In Python, the "->" symbol is used to indicate the return type of a function. It is part of the function definition in a Python 3.5 or later. For example, the following code defines a function add that …

  6. What’s this weird arrow notation in Python? | by Thomas K R

    Jan 19, 2020 · Python doesn’t use arrow notation, like JavaScript — so what is this arrow doing? This, friend, is a return value annotation, which is part of function annotation, and it’s a feature …

  7. python - Python3 function definition, arrow and colon - Stack Overflow

    Feb 6, 2019 · I have found the following python function definition: def reverseString(self, s: 'List[str]') -> 'None': I don't quite understand 'List[str]' and -> 'None'. I have found that the arrow …

  8. Mastering Python – A Complete Guide to Arrow Functions

    Arrow functions, also known as lambda functions, are a concise way of writing functions in Python. They are often used for small, single-expression functions and provide several …

  9. Complete Guide to the Arrow (- > ) Notation in Python - Python

    Oct 10, 2024 · Learn everything about the Arrow(->) notation in Python. This guide explains function annotations, type hinting, practical examples, and best practices for improving code …

  10. Python Arrow Functions and Lambda Functions - Learn At Hive

    In this tutorial, we'll explore Python's lambda functions—often informally referred to as Python's equivalent to JavaScript’s arrow functions—and how to use them effectively. What are …

  11. Some results have been removed
Refresh