Named Tuple & Enum in Python

Python has two very nice data structure called namedtuple and enum which are not that much been use in day to day python coding considering their usefulness. Let's start with namedtuple: namedtuple lib is part of collections package. As name suggest it's kind of tuple which is immutable(unchangeable) with named arguments. Let's see the syntax... Continue Reading →

Advertisements

Remote Debugging Using PyCharm

I had hard time to setup remote debugging using PyCharm. One of the reason is lack of documentation about exact steps to setup the remote debugging. I recently successfully setup remote debugging in pycharm. So these steps should work if you are trying to do the same. Presumption: I am assuming that you have PyCharm... Continue Reading →

Basic of Mocking Explained in Python

While writing the unit tests there are lot of instances when we would like to test the method which is calling third api's  or having dependency on different methods.This article if for beginners, who want to start testing using mocking. What is Mocking: When you test a method(Called A) which has dependency on different methods... Continue Reading →

PyCharm and Intellij KeyBoard Shortcuts

I use pycharm in my daily jobs. I love PyCharm IDE as it's one of the best in market if you do the programming in Python. I always find it easier and faster when I use the keyboard compare to mouse while writing, searching or navigating the code. Note: Use Mac 10.5+ Kyemapping -> Preference ->... Continue Reading →

Some useful itertools functions in python

One of my favorite module in python is itertools as it has plenty of useful function to use. I am highlighting some of the  function which I used often. itertools mostly used when you want to iterate over some sort of data. There are lot of function which been implemented in itertools, however there are some... Continue Reading →

map, filter and reduce with lambda in Python

Python has three really useful functions to use with lambda called map, reduce and filter. I would like to highlight, some basic use of these functions in python: lambda: lambda is utility to quickly create the function in one line. You can consider it as one line function as well. Let'e take example: Let's say... Continue Reading →

Blog at WordPress.com.

Up ↑

%d bloggers like this: