Python Everyday 05: import style

I have seen many projects that have maintenance problems due to “import chaotic”. Today I share a style of “import” that I highly recommend.

  1. Divide the import area to 3 blocks.
  2. Import all of the packages related to python in the first block.
  3. Import all of the packages related to the framework in the second block.
  4. Import packages of your own in the last block.