Message10898

Author Myles
Recipients Myles, zyasoft
Date 2016-08-17.17:09:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471453749.11.0.432698641468.issue2514@psf.upfronthosting.co.za>
In-reply-to
Content
The solution that zyasoft (Jim Baker) suggested seems to work fine.

I tested this by changing it to a LinkedHashSet in Generic (May not be the ideal place but for the test I did this).

Then using the interpreter:

>>> Exception.__subclasses__()
[<type 'exceptions.StandardError'>, <type 'exceptions.StopIteration'>, <type 'exceptions.Warning'>, <class 'warnings._OptionError'>, <class 'sre_constants.error'>]

>>> class TestException(Exception):
...     test = 1
...
>>>

>>> Exception.__subclasses__()
[<type 'exceptions.StandardError'>, <type 'exceptions.StopIteration'>, <type 'exceptions.Warning'>, <class 'warnings._OptionError'>, <class 'sre_constants.error'>, <class '__main__.TestException'>]
>>> Exception.__subclasses__()
[<type 'exceptions.StandardError'>, <type 'exceptions.StopIteration'>, <type 'exceptions.Warning'>, <class 'warnings._OptionError'>, <class 'sre_constants.error'>, <class '__main__.TestException'>]


Indicating the order is now retained as previously the items would all be random.
History
Date User Action Args
2016-08-17 17:09:09Mylessetmessageid: <1471453749.11.0.432698641468.issue2514@psf.upfronthosting.co.za>
2016-08-17 17:09:09Mylessetrecipients: + Myles, zyasoft
2016-08-17 17:09:09Myleslinkissue2514 messages
2016-08-17 17:09:08Mylescreate