About 50 results
Open links in new tab
  1. python - What does ** (double star/asterisk) and * (star/asterisk) do ...

    Aug 31, 2008 · Note: A Python dict, semantically used for keyword argument passing, is arbitrarily ordered. However, in Python 3.6+, keyword arguments are guaranteed to remember insertion order. …

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

    Jan 17, 2013 · 744 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 3 extends …

  3. Purpose of @ symbols in Python? - Stack Overflow

    Jun 2, 2009 · def foo(): """ Basic Doc String """ @classmethod Googling doesn't get me very far, for just a general definition of what this is. Also i cant find anything really in the python documentation. What …

  4. python - What exactly does += do? - Stack Overflow

    What does += do in Python? I also would appreciate links to definitions of other shorthand tools in Python.

  5. python - How do I define a function with optional arguments? - Stack ...

    467 I have a Python function which takes several arguments. Some of these arguments could be omitted in some scenarios.

  6. python - Why do some functions have underscores "__" before and …

    May 24, 2024 · In Python, the use of an underscore in a function name indicates that the function is intended for internal use and should not be called directly by users. It is a convention used to indicate …

  7. What does the "at" (@) symbol do in Python? - Stack Overflow

    An @ symbol at the beginning of a line is used for class and function decorators: PEP 318: Decorators Python Decorators - Python Wiki The most common Python decorators are: @property …

  8. How do Python functions handle the types of parameters that you pass …

    Apr 7, 2017 · Python doesn't know that you are calling the function with the proper types, and expects the programmer to take care of that. If your function will be called with different types of parameters, …

  9. python - How do I get ("return") a result (output) from a function? How ...

    The natural, simple, direct, explicit way to get information back from a function is to return it. Broadly speaking, the purpose of a function is to compute a value, and return signifies "this is the value we …

  10. python - How can we force naming of parameters when calling a …

    15 True, most programming languages make parameter order part of the function call contract, but this doesn't need to be so. Why would it? My understanding of the question is, then, if Python is any …