Skip to main content

Attribute Access and Descriptors

  • Chapter
  • First Online:
Python Descriptors
  • 3535 Accesses

Abstract

In Chapter X it was stated that attribute access calls get transformed into descriptor calls, but it was not stated how. The simple answer is that __getattribute__() does it, but there’s more to it than that, so this answer is also entirely insufficient. This simplification is helpful, since it tells you that, if you want to customize __getattribute__() and have it continue working with descriptors, you need it to delegate to the default implementation with super()

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 9.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Jacob Zimmerman

About this chapter

Cite this chapter

Zimmerman, J. (2016). Attribute Access and Descriptors. In: Python Descriptors. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2505-9_5

Download citation

Publish with us

Policies and ethics