Skip to content

Instantly share code, notes, and snippets.

@XanderVi
Created December 9, 2019 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XanderVi/61117547d7f69f9796717102cb48316f to your computer and use it in GitHub Desktop.
Save XanderVi/61117547d7f69f9796717102cb48316f to your computer and use it in GitHub Desktop.
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