Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/classes.rst @ 50563:93cf3a6ead63 3.0
Merged revisions 68226 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r68226 | georg.brandl | 2009-01-03 22:18:54 +0100 (Sat, 03 Jan 2009) | 2 lines
Remove trailing whitespace.
........
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sun, 04 Jan 2009 00:04:26 +0000 |
| parents | c7abfab4dcdb |
| children | ea7e307ddd51 |
line wrap: on
line diff
--- a/Doc/tutorial/classes.rst Sun Jan 04 00:02:52 2009 +0000 +++ b/Doc/tutorial/classes.rst Sun Jan 04 00:04:26 2009 +0000 @@ -14,7 +14,7 @@ class or classes, and a method can call the method of a base class with the same name. Objects can contain an arbitrary amount of private data. -In C++ terminology, normally class members (including the data members) are +In C++ terminology, normally class members (including the data members) are *public* (except see below :ref:`tut-private`), and all member functions are *virtual*. There are no special constructors or destructors. As in Modula-3, there are no shorthands for referencing the @@ -171,7 +171,7 @@ def do_global(): global spam spam = "global spam" - + spam = "test spam" do_local() print("After local assignment:", spam) @@ -302,7 +302,7 @@ ... def __init__(self, realpart, imagpart): ... self.r = realpart ... self.i = imagpart - ... + ... >>> x = Complex(3.0, -4.5) >>> x.r, x.i (3.0, -4.5) @@ -532,7 +532,7 @@ is ``True`` since :class:`bool` is a subclass of :class:`int`. However, ``issubclass(float, int)`` is ``False`` since :class:`float` is not a subclass of :class:`int`. - + .. _tut-multiple:
