diff options
author | Guido van Rossum <guido@python.org> | 1996-10-22 03:00:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-10-22 03:00:43 (GMT) |
commit | a4e41a805ae48086d1768f83d83559318799e298 (patch) | |
tree | a15d25accef9369a2d2f323d6f76754dd754ce3b /Misc/FAQ | |
parent | 36845ede601c55f0ab34632abe5f8a27840e67f0 (diff) | |
download | cpython-a4e41a805ae48086d1768f83d83559318799e298.zip cpython-a4e41a805ae48086d1768f83d83559318799e298.tar.gz cpython-a4e41a805ae48086d1768f83d83559318799e298.tar.bz2 |
Added question about error from misuse of mangled names.
Diffstat (limited to 'Misc/FAQ')
-rw-r--r-- | Misc/FAQ | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 =================== |