Summary

In this chapter, we learned about the benefits and methods of organizing your code. We explained namespaces, code blocks, and working with namespaces for modules, functions, classes, and methods. We also discussed the import statement, which allows you to import objects from one module to another, and the global statement, which allows you to import module-level variables into a local namespace.

Get Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.