Hi Freddy, On 16 February 2017 at 18:03, Freddy Rietdijk <freddyrietdijk at fridh.nl> wrote: > As I mentioned, it seems only sets cause unreproducible > bytecode. Sets have no order. But when generating the bytecode, I would > expect there would still be an order since the code isn't actually executed, > right? No, the sets are built as real sets and then marshalled to .pyc files in a separate step. So on CPython an essentially random order will end up in the .pyc file. Even CPython 3.6 gives a deterministic order to dictionaries but not sets. You could ensure sets are marshalled in a known order by changing the marshalling code, e.g. to emit them in sorted order (on Python 2.x; on 3.x it is more messy because different types are more often non-comparable). A bientôt, Armin.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4