summaryrefslogtreecommitdiff
path: root/docs/esp8266/tutorial/powerctrl.rst
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-12-12 15:22:03 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-12 16:53:44 +1100
commitc78ef92d787d7bab8acbec69e978037ec2b20d21 (patch)
treed539242f509ac167ee78f790b8e5424b06f801d8 /docs/esp8266/tutorial/powerctrl.rst
parent3c28df16586157b6b80e7437559c36f05a309e24 (diff)
py/objtype: Refactor object's handling of __new__ to not create 2 objs.
Before this patch, if a user defined the __new__() function for a class then two instances of that class would be created: once before __new__ is called and once during the __new__ call (assuming the user creates some instance, eg using super().__new__, which is most of the time). The first one was then discarded. This refactor makes it so that a new instance is only created if the user __new__ function doesn't exist.
Diffstat (limited to 'docs/esp8266/tutorial/powerctrl.rst')
0 files changed, 0 insertions, 0 deletions