Skip to main content

Posts

Featured

Today I learned- Python's Absolute Import

While exploring the Django and Django REST source code I found- from __future__ import absolute_import and curious to find more about it started searching for various resources. Importing in Python versions  <3.x was relative in modules and absolute in >=3.x versions so we use absolute_import  for making import absolute for python <3.x versions. Now when using absolute imports we have a few interesting scenarios which I found making this importing concept confusing. The resource which provided the answers to all my doubts and made this clear was this post- https://blog.tankywoo.com/python/2013/10/07/python-relative-and-absolute-import.html

Latest posts

Codeforces Round #377 (Div. 2) Exam Solution

Broadcom Limited BCM43142 (rev 01) driver installation on hp laptop with Ubuntu 16.04 LTS

Codeforces Persistent Bookcase Solution in Java

Codeforces Mishkaan & Interesting Sum

Java template code for competitive coding

Codeforces B - Mike and Shortcuts Solution

Codeforces NP-Hard Problem Solution