This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger, techtonik
Date 2013-09-15.18:25:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379269549.16.0.384035631498.issue19026@psf.upfronthosting.co.za>
In-reply-to
Content
In general, it is not possible for a hypothetical StrictOrderedDict to know whether its input was ordered or not.  For the specific case of dict, it is possible, but the general case is of course completely general (i.e. if the input has a keys() method, the pairs are loaded with:  for k in other.keys(): od[k] = other[k]).  Those semantics are guaranteed.

Remember, Armin's core concept for OrderedDict was "to remember the order that keys were added, the order is determined by whoever does the adding".

FWIW, the stackoverflow question was resolved trivially.  The learning point is perfectly general (i.e. it explains why you write Decimal('1.1') instead of Decimal(1.1)).
History
Date User Action Args
2013-09-15 18:25:49rhettingersetrecipients: + rhettinger, techtonik
2013-09-15 18:25:49rhettingersetmessageid: <1379269549.16.0.384035631498.issue19026@psf.upfronthosting.co.za>
2013-09-15 18:25:49rhettingerlinkissue19026 messages
2013-09-15 18:25:48rhettingercreate