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

    Jan 17, 2013 · In Python 3.5 though, PEP 484 -- Type Hints attaches a single meaning to this: -> is used to indicate the type that the function returns. It also seems like this will be enforced in …

  2. How do I declare custom exceptions in modern Python?

    By "modern Python" I mean something that will run in Python 2.5 but be 'correct' for the Python 2.6 and Python 3.* way of doing things. And by "custom" I mean an Exception object that can …

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

    Functions, in Python, are first class objects - which means you can pass a function as an argument to another function, and return functions. Decorators do both of these things. If we …

  4. How do I declare an array in Python? - Stack Overflow

    Aug 23, 2022 · Python has an independent implementation of array() in the standard library module array " array.array() " hence it is incorrect to confuse the two. Lists are lists in python …

  5. No definition found for function - VSCode Python

    Oct 8, 2020 · I am using VSCode for Python along with the Microsoft for Python extension enabled in VSCode. For Python v3.9.0 I am getting No definition found if I try to seek a …

  6. What do the symbols "=" and "==" mean in python? When is each …

    Nov 11, 2025 · The difference is that is Python that is now equal to . , on the other hand, is Python if is equal to . There are places where you can't Python what is equal to, but you ask.

  7. Python class definition syntax - Stack Overflow

    6 A class definition is a bit different from a function/method definition. The parentheses in class definitions are for defining from which class you inherit. You don't write def in front of it, and …

  8. Understanding Python super() with __init__() methods

    Feb 23, 2009 · In Python 2, we were required to call super like this with the defining class's name and self, but we'll avoid this from now on because it's redundant, slower (due to the name …

  9. python - How do I split the definition of a long string over multiple ...

    The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping …

  10. python - Vscode can't use the function "go to definition" and can …

    Jan 16, 2019 · I'm using VScode for my python project on macOS, but I cannot use the function of go to definition and can not open file in PROBLEMS. For example: when I control-click …