Jump to content

Talk:Python Programming/Classes

Page contents not supported in other languages.
Add topic
From Wikibooks, open books for an open world
Latest comment: 8 years ago by Dan Polansky in topic Some older posts

Some older posts

[edit source]

New style classes has a confusing sentence:

New style classes were introduced in python 2.2. A new-style class is a class that has a built-in as its base, most commonly object. 

Is this supposed to read "...as its base, most commonly AN object"?


I can't be bothered to do this myself ;p, but the examples could use some better variable names, random letters may be fine for small parts, but it's hard to remember what they are several lines down, and not even in the same code block. Ragzouken18:03, 17 August 2006 (UTC)Reply


The whole article should be reworked. For example the Attributes section contains wrong information; you are not able to hide attributes by defining the __getattr__ method as this method is only called when the attribute is not accessible. See also http://docs.python.org/ref/attribute-access.html217.236.101.14 (talk) 17:56, 8 February 2008 (UTC)Reply

Edit paragraph "Dynamic Class Structure" -> C language does not have classes, but C++ does.

Corrected in [1]. --Dan Polansky (discusscontribs) 06:51, 25 March 2017 (UTC)Reply

The example for Representation/__str__ is incomplete it seems. What did the original author intend to return?

close