Skip to content

Instantly share code, notes, and snippets.

@gvx
gvx / aliasdict.py
Created June 14, 2011 17:48
Path to Philosophy code
class Alias(object):
def __init__(self, initial):
self._set = {initial}
self.initial = initial
def add(self, alias):
self._set.add(alias)
def merge(self, other):
self._set.update(other._set)
def __iter__(self):
return iter(self._set)