Author josh.r
Recipients barry, brett.cannon, josh.r, nascheme, serhiy.storchaka
Date 2018-03-28.15:18:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522250312.98.0.467229070634.issue33124@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy: There is a semi-common case where global constants can be quite expensive, specifically, initializing a global full of expensive to compute/serialize data so it will be shared post-fork when doing multiprocessing on a POSIX system. That said, that would likely be a case where lazy initialization would be a problem; you don't want each worker independently initializing the global lazily.

Also, for all practical purposes, aren't enums and namedtuples global constants too? Since they don't rely on any syntax based support at point of use, they're just a "function call" followed by assignment to a global name; you couldn't really separate the concept of global constants from enums/namedtuple definitions, right?
History
Date User Action Args
2018-03-28 15:18:33josh.rsetrecipients: + josh.r, barry, brett.cannon, nascheme, serhiy.storchaka
2018-03-28 15:18:32josh.rsetmessageid: <1522250312.98.0.467229070634.issue33124@psf.upfronthosting.co.za>
2018-03-28 15:18:32josh.rlinkissue33124 messages
2018-03-28 15:18:32josh.rcreate