Chapter 2. Introduction to Python
This chapter covers
- The Python datatypes
- Basic language constructs
- Exception handling, list comprehensions, and closures
- Python project structure: modules and packages
- The Python standard library
Programming is a craft. Knowing the rules of a programming language is the science behind the art of creating well-structured and elegant programs. Your programs may be small and functional, or they may be vast cathedrals adorned with the intricate masonry of recursive algorithms and data structures. The joy of programming is found in the process of creation as much as in the final result.
In the first chapter, you had a taste of Python, which is essential to programming with IronPython; luckily, Python is easy to learn. This chapter is a fast-paced Python tutorial that will give you a great foundation in Python the language, both for following the examples in this book and for creating your own applications.
This chapter does assume some experience in programming, but not in any particular language, so it should be easy to follow. Even if you’re already fluent in Python, you should skim this chapter because there are interesting details that are specific to IronPython. If you’re not already a fluent Python speaker, the goal of this chapter is for you to learn enough Python so that you can confidently tackle creating a well-structured IronPython application in the coming chapters.