]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added question about error from misuse of mangled names.
authorGuido van Rossum <guido@python.org>
Tue, 22 Oct 1996 03:00:43 +0000 (03:00 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 22 Oct 1996 03:00:43 +0000 (03:00 +0000)
Misc/FAQ

index d8c5663af199447fc9896d5f7e925b1656ad68e7..7856f4e05d93ff4c296f853cb9f549ceb73e1be7 100644 (file)
--- a/Misc/FAQ
+++ b/Misc/FAQ
@@ -176,6 +176,7 @@ Here's an overview of the questions per chapter:
   4.38. Q. How do I copy an object in Python?
   4.39. Q. How to implement persistent objects in Python?  (Persistent ==
         automatically saved to and restored from disk.)
+  4.40. Q. I try to use __spam and I get an error about _SomeClassName__spam.
 
  5. Extending Python
   5.1. Q. Can I create my own functions in C?
@@ -1678,6 +1679,12 @@ A. The library module "pickle" now solves this in a very general way
 windows), and the library module "shelve" uses pickle and (g)dbm to
 create presistent mappings containing arbitrary Python objects.
 
+4.40. Q. I try to use __spam and I get an error about _SomeClassName__spam.
+
+A. Variables with double leading underscore are "mangled" to provide a
+simple but effective way to define class private variables.  See the
+chapter "New in Release 1.4" in the Python Tutorial.
+
 
 5. Extending Python
 ===================