#Python Python 101 : Shallow copies - Lists and Tuples - We have the below data structures: We try to add an elements to one list as below: Appending " 10 " to list1 does not add " 10 " to list October 02, 2023 Share
#Python Python 101 : Deep copies and shallow copies - List example - In the below example, we make a shallow copy " l2 " of a list " l1 " using regular " = " assignment, we also make a deep copy September 15, 2023 Share
#Istio, #Kubernetes Istio 101 : Defining the response to Error codes in web applications - EnvoyFilter - In order to help istio handle network problems, we could use for example the automatic retries . Within the automatic reply parameter, we could also set September 07, 2023 Share
#Python Python 101 : Decorators with arguments - Passing a parameter to a decorator - We could use decorators with parameters for example to control the flow of the execution of a decorator as we can see below: As we can see above, we co August 31, 2023 Share
#Istio Istio 101 : Sidecar injection into a Kubernetes deployment Injection of sidecar in a kubernetes application, means that istio is going to modify the deployment's Yaml file of our pods to include a side car August 24, 2023 Share
#Python Python 101 : Overriding function - The super() method - When we override a function in a subclass. The super() function helps us call the "original" method in the parent class as we can see in the August 14, 2023 Share
#Python Python 101 : Keyword arguments To avoid confusing positional "regular" argument, we could name our parameters and specify them by name using keyword arguments . When calling August 04, 2023 Share
#Python Python 101 : Interfaces - blueprints of classes - An interface does nothing. It only provides a blueprint comprised of methods that classes - using that blueprint - must follow. To create an interface July 26, 2023 Share
#Python Python 101 : Private variables There are no real private variable in python , but we can keep some variable from being visible from outside the "private" scope. In our below July 18, 2023 Share
#Python Python 101 : An introduction to Iterators and Iterables. In python , iterables are objects that we can loop through. These objects implement an " __iter__() " function that returns an iterato r . The iter July 10, 2023 Share
#Python Python 101 : The keyword arguments and the "*" parameter A keyword argument has the following format " name=value ". We can pass a keyword argument to a function as follows: We could also call the fun July 03, 2023 Share
#Python Python 101 : Context managers - "with" expression - Context managers give you a way to allocate and release resources depending on your need s. To define context managers we make use of the the expressio June 26, 2023 Share
#Python Python 101 : The " __name__ = 'main()' " expression Sometimes, for some reasons, we may want our code to run from the main program, not from imported code using the " import " syntax. Before runn June 20, 2023 Share
#Python Python 101 : Different ways of looping over lists The " for " loop is used to iterate over the elements an " iterable " python object, for example - string, list, tuple -. We have below June 13, 2023 Share
#Python Python 101 : The "yield" instruction and its generator The " yield " instruction must "live" within a function. When a function that contains a " yield " statement is called, the June 06, 2023 Share
#Python Python 101 : Handling errors - Making your own exceptions - We create a class that inherits from the " Exception " class. Our exception class is called " OurException " and it is raised when a v May 31, 2023 Share
#Python Python 101 : The "@property" decorator for classes -Setter and Getter methods - The " @property " refers to a python decorator - a function that adds functionalities to another function without modifying its code -. The &qu May 22, 2023 Share
#Python Python 101 : Class methods If a method has a @classmethod decorator, then it is a class method . A class method has as its first argument " cls " which refers to the class May 17, 2023 Share
#Python Python 101 : Parent and children classes - __init__(), super() - For our example, we define a class called " Member ": We subclass our class " Member " as below: Defining __init__() in our subclass wi May 10, 2023 Share
#Python Python 101 : The __setattr__() function and __dict__ object The __setattr__() method is called in the background when we assign an attribute to a python object. Below is our example, the " C ar " class: We s May 03, 2023 Share