Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
It is found that some functions in python exist purely to perform certain actions rather than to calculate and return something. How do such functions return none and what are they called?
I have an application that has functions and classes which contain docstrings. I want documentation to be generated from these doctrings into a neat format. What are the softwares available that automate documentation in python?
Basically, when Python parses the following code: it looks up bar in foo, and then examines bar. When does bar become a property of the object rather than just an attribute?
I have this python code. When this code is run, I get an error for the second function call with a single argument. In this context, what are required arguments of a function in python?
How do I use the unittest module to test if a function throws an exception or not? How do I test if a function involving addition of an integer and a string throw an exception or not?
It is found that if python code is run normally and then if it is run in a python function, it runs faster in the latter case. I want to know why python code runs faster in a function.
What are the basic scoping rules for python variables? How do these rules apply to various scopes like the local scope, built in scope, global scope and so on?