string (resulting in UnicodeEncodeError). If an Atom instance is passed into
the constructor, just return the given instance.
svn path=/main/trunk/; revision=13905
identical instances when available.
"""
def __call__(cls, s):
+ if isinstance(s, Atom):
+ return s
instance = cls._atoms.get(s)
if instance is None:
instance = super(_AtomCache, cls).__call__(s)
return repr(self._str)
def __str__(self):
- return str(self._str)
+ return self._str
def endswith(self, *pargs, **kargs):
return self._str.endswith(*pargs, **kargs)