Re: Scons none-deterministic behavior for incremental build

Mats Wichmann <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
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.
_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.