does the order in which the modules are placed in a file matters ?

Ganesh Pal ganesh1pal at gmail.com
Wed Dec 16 11:09:05 EST 2015


Iam on python 2.7 and linux .I need to know if we need to place the
modules  in a particular or it doesn't matter at all

order while writing the program

For Example

import os
import shlex
import subprocess
import time
import sys
import logging
import  plaftform.cluster
from util import run


def main():
     """ ---MAIN--- """

if __name__ == '__main__':
    main()

In the above example :

1. Iam guessing  may be the python modules like os , shlex etc come
first and later the user defined modules like import
plaftform.cluster .etc come latter

Sorry if my question sounds dump , I was running pep8 and don't see
its bothered much about it


Regards,
Ganesh



More information about the Python-list mailing list