modules almost at the end of the moduleafter all the functions have been definedthere is single call to resize()resize(_max_rows_max_columnsthis call initializes the grid to the default size ( and ensures that code that imports the module can safely make use of it immediately without this callevery time the module was importedthe importing program or module would have to call resize(to initialize the gridforcing programmers to remember that fact and also leading to multiple initializations if __name__ ="__main__"import doctest doctest testmod(the last three lines of the module are the standard ones for modules that use the doctest module to check their doctests (testing is covered more fully in the chargrid module has an important failingit supports only single character grid one solution to this would be to hold collection of grids in the modulebut that would mean that users of the module would have to provide key or index with every function call to identify which grid they were referring to in cases where multiple instances of an object are requireda better solution is to create module that defines class ( custom data type)since we can create as many class instances (objects of the data typeas we like an additional benefit of creating class is that we should be able to avoid using the global statement by storing class (staticdata we will see how to create classes in the next overview of python' standard library ||python' standard library is generally described as "batteries included"and certainly wide range of functionality is availablespread over around two hundred packages and modules in factso many high-quality modules have been developed for python over the yearsthat to include them all in the standard library would probably increase the size of the python distribution packages by at least an order of magnitude so those modules that are in the library are more reflection of python' history and of the interests of its core developers than of any concerted or systematic effort to create "balancedlibrary alsosome modules have proved very difficult to maintain within the library--most notably the berkeley db module--and so have been taken out of the library and are now maintained independently this means many excellent third-party modules are available for python that--despite their quality and usefulness--are not in the standard