A module pattern for nearly every occasion.
This gist is a fork of work by `millermedeiros <https://gist.github.com/1251668>`_ which is, in turn, a fork of work by `rpflorence <https://gist.github.com/1198466>`_.
A module pattern for nearly every occasion.
This gist is a fork of work by `millermedeiros <https://gist.github.com/1251668>`_ which is, in turn, a fork of work by `rpflorence <https://gist.github.com/1198466>`_.
class ToDo(object): | |
"""base ToDo class - simple datastructure for defining a ToDo Item""" | |
def __init__(self, description, location = None): | |
super(ToDo, self).__init__() | |
self._description = description | |
self._isThisDone = False | |
self._location = location | |
@property | |
def description(): |
(function (name, definition) { | |
"use strict"; | |
// Call the definition in the current context so that it can access the | |
// global object in case of a browser environment. | |
var the_module = definition.call(this), | |
has_exports = typeof module !== 'undefined' && module.exports, | |
obj, | |
namespaces, | |
scope, | |
i, |