Created
December 9, 2019 08:30
-
-
Save XanderVi/61117547d7f69f9796717102cb48316f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
class NewItem: | |
def __init__(self, analysis_date, keyword, current_cpc_max, previous_cpc_max): | |
self.analysis_date = analysis_date | |
self.keyword = keyword | |
self.current_cpc_max = current_cpc_max | |
self.previous_cpc_max = previous_cpc_max | |
item = NewItem('2019-12-09', 'keyword', 12.84, 11.83) | |
d_item = {'analysis_date': '2019-12-09', | |
'keyword': 'keyword', | |
'current_cpc_max': 12.84, | |
'previous_cpc_max': 11.83} | |
print(f'item size = {sys.getsizeof(item)} |', | |
f'd_item size = {sys.getsizeof(d_item)}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment