added __slots__ to decrease memory footprint of Link objects

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40413
This commit is contained in:
Pablo Hoffman 2008-11-25 00:39:11 +00:00
parent a8903d5877
commit 5028146e8c
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ class Link(object):
Link objects represent an extracted link by the LinkExtractor.
At the moment, it contains just the url and link text.
"""
__slots__ = 'url', 'text'
def __init__(self, url, text=''):
self.url = url
self.text = text