This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
https://web.archive.org/web/20070429181654/http://www.sics.se/~joe/
| import functools | |
| import collections | |
| import cherrypy | |
| class SelectedMethod: | |
| """ | |
| Descriptor allowing a series of handler methods to satisfy | |
| a variety of behaviors based on the request method. |
This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.
https://web.archive.org/web/20070429181654/http://www.sics.se/~joe/
| from pymongo import Connection | |
| class MongoCon(object): | |
| __db = None | |
| @classmethod | |
| def get_connection(cls): | |
| if cls.__db is None: | |
| cls.__db = Connection() | |
| return cls.__db |