rest25/library/bastion.rst => rest262/library/bastion.rst
f1
2:mod:`Bastion` --- Restricting access to objects
3================================================
4
5.. module:: Bastion
6   :synopsis: Providing restricted access to objects.
n7+   :deprecated:
8+ 
9+.. deprecated:: 2.6
10+   The :mod:`Bastion` module has been removed in Python 3.0.
11+ 
7.. moduleauthor:: Barry Warsaw <bwarsaw@python.org>
8
9
10.. versionchanged:: 2.3
11   Disabled module.
12
13.. warning::
14
17
18According to the dictionary, a bastion is "a fortified area or position", or
19"something that is considered a stronghold."  It's a suitable name for this
20module, which provides a way to forbid access to certain attributes of an
21object.  It must always be used with the :mod:`rexec` module, in order to allow
22restricted-mode programs access to certain safe attributes of an object, while
23denying access to other, unsafe attributes.
24
n25-.. % I'm concerned that the word 'bastion' won't be understood by people
n30+.. I'm concerned that the word 'bastion' won't be understood by people
26-.. % for whom English is a second language, making the module name
31+.. for whom English is a second language, making the module name
27-.. % somewhat mysterious.  Thus, the brief definition... --amk
32+.. somewhat mysterious.  Thus, the brief definition... --amk
28
t29-.. % I've punted on the issue of documenting keyword arguments for now.
t34+.. I've punted on the issue of documenting keyword arguments for now.
30
31
32.. function:: Bastion(object[, filter[, name[, class]]])
33
34   Protect the object *object*, returning a bastion for the object.  Any attempt to
35   access one of the object's attributes will have to be approved by the *filter*
36   function; if the access is denied an :exc:`AttributeError` exception will be
37   raised.
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op