Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100514

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

From Ganesh Pal <ganesh1pal@gmail.com>
Newsgroups comp.lang.python
Subject does the order in which the modules are placed in a file matters ?
Date 2015-12-16 21:39 +0530
Message-ID <mailman.12.1450282153.30845.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

does the order in which the modules are placed in a file matters ? Ganesh Pal <ganesh1pal@gmail.com> - 2015-12-16 21:39 +0530

csiph-web