|
|
#1 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Aug 2018
Device: none
|
__builtin__.__dict__['dynamic_property']
Hi, I was browsing through the source code and came across the following line:
Code:
__builtin__.__dict__['dynamic_property'] = lambda func: func(None) I'm curious why this was done like this instead of creating a separate module to be imported? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Because it is used in lots of places. THere are a few extra code-wide globals calibre uses.
|
|
|
|
| Advert | |
|
|