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 future versions …

  2. 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 so be careful …

  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 stack decorators, the …

  4. Create a python class definition from a serialized JSON object?

    Feb 18, 2024 · 2 What I'm trying to do is to create Python class definitions in code by reading a JSON file. I don't want to have the class pre-written in Python and then load it with the JSON data. I want to …

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

  6. How to see the source code inside the library when doing ctrl+click (go ...

    Jan 15, 2025 · 10 I know that in VS Code, we can find the definition of variable/function by ctrl + clicking. Ctrl + click also supports that for variables/functions declared inside the libraries we've installed (e.g. …

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

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

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

    See also: How can I do a line break (line continuation) in Python (split up a long line of source code)? when the overall line of code is long but doesn't contain a long string literal.

  10. Make function definition in a python file order independent

    Apr 17, 2009 · I use Python CGI. I cannot call a function before it is defined. In Oracle PL/SQL there was this trick of "forward declaration": naming all the functions on top so the order of defining doesn't m...