Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part 2: Core development techniques > Metaprogramming, protocols, and more

8. Metaprogramming, protocols, and more

This chapter covers
  • Python protocols

  • Dynamic attribute access

  • Metaprogramming with metaclasses

  • Advanced .NET interoperation


In this chapter, we’re going to look under the hood of the Python programming language. We’ve covered all the basic syntax and how to use classes from the .NET framework with IronPython. To make full use of Python, you need to know how to hook Python classes into the infrastructure that the language provides. As you write classes and libraries in Python, you’ll need to define how your objects take part in normal operations and interact with other objects. Much of this interaction is done through protocols, the magic methods that we’ve already briefly discussed.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial