Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30499
| From | Christian Heimes <christian@python.org> |
|---|---|
| Subject | Re: [RELEASED] Python 3.3.0 |
| Date | 2012-09-29 16:06 +0200 |
| References | <5066E72E.2010100@python.org> <DUB117-W380D12F6F3E5062720F59491810@phx.gbl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1631.1348927583.27098.python-list@python.org> (permalink) |
Am 29.09.2012 15:42, schrieb Andriy Kornatskyy:
>
> The following doctest fails with python3.3 (it is okay for python2.4-2.7, 3.2).
>
> class adict(dict):
> """
> >>> d = adict(a=1, b=2)
> >>> d
> {'a': 1, 'b': 2}
> """
>
> if __name__ == "__main__":
> import doctest
> doctest.testmod()
>
> Please advise if that is something known.
Yes, it's caused by the hash randomization. From now on you can't rely
on the order of an unordered type like dict or set. You could replace d
with sorted(d.items()).
Christian
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [RELEASED] Python 3.3.0 Christian Heimes <christian@python.org> - 2012-09-29 16:06 +0200
csiph-web