summaryrefslogtreecommitdiff
path: root/doxygen/man/man3/cmd2_Borg.3
blob: d6a9d0126efa33341f68ea9431922740d68e22a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.TH "cmd2::Borg" 3 "Fri Sep 9 2011" "Cmd2" \" -*- nroff -*-
.ad l
.nh
.SH NAME
cmd2::Borg \- 
.SH SYNOPSIS
.br
.PP
.PP
Inherited by \fBcmd2::OutputTrap\fP'\&.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "def \fB__new__\fP"
.br
.in -1c
.SS "Static Private Attributes"

.in +1c
.ti -1c
.RI "dictionary \fB_shared_state\fP = {}"
.br
.in -1c
.SH "Detailed Description"
.PP 
.PP
.nf
All instances of any Borg subclass will share state.
from Python Cookbook, 2nd Ed., recipe 6.16.fi
.PP
 
.PP
Definition at line 1450 of file cmd2\&.py'\&.
.SH "Member Function Documentation"
.PP 
.SS "def cmd2::Borg::__new__ (cls, a, k)"
.PP
Definition at line 1454 of file cmd2\&.py'\&.
.PP
.nf
1454 
1455     def __new__(cls, *a, **k):
1456         obj = object\&.__new__(cls, *a, **k)
1457         obj\&.__dict__ = cls\&._shared_state
        return obj
.fi
.SH "Member Data Documentation"
.PP 
.SS "dictionary \fBcmd2::Borg::_shared_state\fP = {}\fC [static, private]\fP"
.PP
Definition at line 1453 of file cmd2\&.py'\&.

.SH "Author"
.PP 
Generated automatically by Doxygen for Cmd2 from the source code'\&.