mirror of https://github.com/scrapy/scrapy.git
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:
parent
a8903d5877
commit
5028146e8c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue