[Scons-users] Scons none-deterministic behavior for incremental build

Mats Wichmann mats at wichmann.us
Wed Dec 5 10:38:17 EST 2018


On 12/5/18 6:30 AM, Hua Yanghao wrote:
>> I guess that's an implementation detail... cpython 3 doing something
>> different than 2.7. there has never been any promise: "A set object is
>> an unordered collection of distinct hashable objects."
> 
> Indeed. But it is so easy to overlook it.
> I still think if now dict() starts to track ordering, so should set() too.
> Basically all iterables in python should track orders when they are
> created and when new items are added.
> But I guess this should be discussed in python community instead.

I assume people are... the dict story changed when people figured out
how to preserve ordering without giving up efficiency.

You can use a dict (or prefereably an OrderedDict, so it is absolutely
clear what you mean) like a set by adding only keys (all values None);
you will get uniqueness and reasonably effective membership tests.


More information about the Scons-users mailing list