Koterpillar

Olympic import sorting

Many programming languages recommend the following order of imports: standard library first, then all the third party modules sorted alphabetically, and finally, program's own modules.

Here's an example from Python:

import os
import sys

from django.db import models
import django.views

from my_package import my_module

If you look closely, this is the order the countries come out during the Olympic games opening ceremony!

  • Greece
  • All the other countries alphabetically
  • Host country

Let's call this import order "olympic sorting".