home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pyhtmldoc / s / special_at < prev    next >
Encoding:
Text File  |  1996-11-14  |  1.0 KB  |  24 lines

  1. <TITLE>Special Attributes -- Python library reference</TITLE>
  2. Prev: <A HREF="../o/other_built-in_types" TYPE="Prev">Other Built-in Types</A>  
  3. Up: <A HREF="../t/types" TYPE="Up">Types</A>  
  4. Top: <A HREF="../t/top" TYPE="Top">Top</A>  
  5. <H2>2.1.8. Special Attributes</H2>
  6. The implementation adds a few special read-only attributes to several
  7. object types, where they are relevant:
  8. <P>
  9. <UL>
  10. <LI>•  <CODE><VAR>x</VAR>.__dict__</CODE> is a dictionary of some sort used to store an
  11. object's (writable) attributes;
  12. <P>
  13. <LI>•  <CODE><VAR>x</VAR>.__methods__</CODE> lists the methods of many built-in object types,
  14. e.g., <CODE>[].__methods__</CODE> yields
  15. <CODE>['append', 'count', 'index', 'insert', 'remove', 'reverse', 'sort']</CODE>;
  16. <P>
  17. <LI>•  <CODE><VAR>x</VAR>.__members__</CODE> lists data attributes;
  18. <P>
  19. <LI>•  <CODE><VAR>x</VAR>.__class__</CODE> is the class to which a class instance belongs;
  20. <P>
  21. <LI>•  <CODE><VAR>x</VAR>.__bases__</CODE> is the tuple of base classes of a class object.
  22. <P>
  23. </UL>
  24.