~super-friends/friends/trunk-next

Viewing all changes in revision 195.

  • Committer: Robert Bruce Park
  • Date: 2013-03-29 00:52:39 UTC
  • Revision ID: robert.park@canonical.com-20130329005239-q0wm2szbo8p6gi45
Simplify URL shortening code *even further*.

I was looking at the lookup() method, when I realized that it was
really a constructor in disguise. So I set out to make it a
@classmethod on Shortener. But then I realized that not only was it a
constructor, it was *THE* constructor. Like, the only one that anybody
would ever care about. So I rewrote Shortener.__init__ to do what
lookup() was doing, and in the process I made NullShortener subclass
irrelevant, so I removed that.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: