Mystery with remove and pop in Python lists

Thanks Vishal for his inputs on this.. According to python docs list.remove(x)Remove the first item from the list whose value is x. It is an error if there is no such item.list.pop([i])Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last … Continue reading Mystery with remove and pop in Python lists

Python: Dynamic typed

According to wikipedia, "A programming language is said to be dynamically typed when the majority of its type checking is performed at run-time as opposed to at compile-time. In dynamic typing values have types, but variables do not; that is, a variable can refer to a value of any type. " In statically typed language … Continue reading Python: Dynamic typed

Exploiting the power of multi-core for scientific computing in Python

Vishal Kanaujia and I presented a talk on ‘Diving into Byte-code optimization in Python’ at SciPy conference held at IIT Bombay from 04-07 Dec 11. Agenda of the talk: Understanding the big data problem in scientific compution A good design strategy for developing applications Python with Multi-cores threading GIL impact multiprocessing Pros and Cons Beyond CPython GIL free … Continue reading Exploiting the power of multi-core for scientific computing in Python

Object lifetime in Python

Wikipedia says, " In computer science, the object lifetime (or life cycle) of an object in object-oriented programming is the time between an object's creation (also known as instantiation or construction) till the object is no longer used, and is destructed or freed. " Typically, an object goes through the following phases during it's lifetime: … Continue reading Object lifetime in Python

Diving into Byte-code optimization in Python

Vishal Kanaujia and I presented a talk on 'Diving into Byte-code optimization in Python' at SciPy conference held at IIT Bombay from 04-07 Dec 11. Agenda of the talk: Python Virtual Machine: internals Reverse engineering: Python byte code ("pyc" files) Exploring Python dis-assembler for pyc Optimizing python byte code for time-efficiency Peephole optimization Tweaking the … Continue reading Diving into Byte-code optimization in Python