Commit MetaInfo

Revisão2ea27779cde27879ac2e6bdd07f752ff2834cc55 (tree)
Hora2011-01-04 15:14:29
AutorHidehisa SHIOMI <shiomi@ee.e...>
CommiterHidehisa SHIOMI

Mensagem de Log

Singleton生成の実験

Mudança Sumário

Diff

diff -r 1ae56f8fde31 -r 2ea27779cde2 src/PyLAF/__init__.py
--- a/src/PyLAF/__init__.py Mon Dec 20 13:35:12 2010 +0900
+++ b/src/PyLAF/__init__.py Tue Jan 04 15:14:29 2011 +0900
@@ -13,3 +13,9 @@
1313 from easy import *
1414 from instant import *
1515 from lib import *
16+
17+class Root:
18+ def __call__(self):
19+ return self
20+
21+# Root = Root()
diff -r 1ae56f8fde31 -r 2ea27779cde2 src/test/singleton.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/test/singleton.py Tue Jan 04 15:14:29 2011 +0900
@@ -0,0 +1,12 @@
1+'''
2+Created on 2011/01/04
3+
4+@author: bijoux
5+'''
6+
7+import PyLAF
8+
9+print PyLAF.Root
10+print PyLAF.Root()
11+root = PyLAF.Root()
12+print root
\ No newline at end of file
Show on old repository browser