5464fc26226597d26b4705b6cbce3dd092b9706c,ggplot/components/layer.py,layer,__deepcopy__,#layer#Any#,77
Before Change
// arguments
class _empty(object):
pass
result = _empty()
result.__class__ = self.__class__
for key, item in self.__dict__.items():
// don"t make a deepcopy of data!
if key == "data":
result.__dict__[key] = self.__dict__[key]
After Change
Deep copy without copying the self.data dataframe
cls = self.__class__
result = cls.__new__(cls)
memo[id(self)] = result
for key, item in self.__dict__.items():
if key == "data":
result.__dict__[key] = self.__dict__[key]
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 8
Instances Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/components/layer.py
Class Name: layer
Method Name: __deepcopy__
Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/themes/theme_xkcd.py
Class Name: theme_xkcd
Method Name: __deepcopy__
Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom.py
Class Name: geom
Method Name: __deepcopy__
Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/ggplot.py
Class Name: ggplot
Method Name: __deepcopy__
Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/stats/stat.py
Class Name: stat
Method Name: __deepcopy__