

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Self - ✔️ ✔️ ✔️ ✔️ Self is a python convention to denote a self reference to the object/class being instantiated. It's passed in as the first argument explicitly. init_method - ✔️ ✔️ ✔️ ✔️ The init() method initializes the attributes of an object and is called immediately after an object has been newly created Tuples - ✔️ ✔️ ✔️ ✔️ Tuples are static or immutable data types. Tuples are faster and better performance wise. Lists - ✔️ ✔️ ✔️ ✔️ Lists are mutable. What's a "Meta Class" - ✔️ ✔️ ✔️ ✔️ A metaclass is an instance of a class. A metaclass is not part of an object's class hierarchy whereas base classes are. So when an object does "obj.some_method()" it will not search the metaclass for this method however the metaclass may have created it during the class' or object's creation. Describe the Map Function - ✔️ ✔️ ✔️ ✔️ "A Map is used to..." Apply function to every item of iterable and return a list of the results. [...] The iterable arguments may be a sequence or any iterable object; the result is always a list. new - ✔️ ✔️ ✔️ ✔️ Static Method that is called to create an instance of the class del - ✔️ ✔️ ✔️ ✔️ The del() method is invoked when an object is about to be destroyed.This method is invoked only when an object is no longer in use. str - ✔️ ✔️ ✔️ ✔️ The str() method is called by the built-in str() function and by the print statement. It differs from repr() in that the string it returns can be more concise and informative to the user. If this method is undefined, the repr() method is invoked. The Attribute Operator (.) - ✔️ ✔️ ✔️ ✔️ The dot (.) operator is used to access the attributes of an object. What's a "Generator?" - ✔️ ✔️ ✔️ ✔️ A generator is a function that produces values for use in iteration.
How do you create a package? - ✔️ ✔️ ✔️ ✔️ A package is defined by creating a directory with the same name as the package and creating the file init.py in that directory. How do you write a function that accepts any # of arguments? - ✔️ ✔️ ✔️ ✔️ Use a * argument What are decorators? - ✔️ ✔️ ✔️ ✔️ By definition, decorator is a function that takes another function and extends the functionality of the latter without explicitly modifying it. Explain the Unit Testing Process - ✔️ ✔️ ✔️ ✔️ 1. Instantiates the MainTest Class to get a MainTest object.