Author amak
Recipients amak, asmeurer
Date 2011-09-03.01:54:28
SpamBayes Score 3.03617e-10
Marked as misclassified No
Message-id <>
__slots__ is an cpython optimization hack, whereby certain metadata overhead is eliminated for variables that are declared in the __slots__ list/tuple. It also affects inheritance, particularly multiple inheritance.

Having an empty __slots__ variable is a dirtier hack for modifying the readability of class attributes.

You need to 

A: Contact the original committer of the __slots__ optimisation and *make* them justify their commit. They need to rationalize *why* their commit is a benefit to a code base that is expected to run on multiple python versions, e.g. cpython, jython, ironpython, pypy, etc. Have they tested on all of the target platforms? If not, the change should be rejected.

B: Hack around it (jythonistas have to do this all the time: cpython developers seem to have an attitude that cpython running on their favourite operating system is the only python on the world).

This should work

    import java
except ImportError:
    __slots__ = []
Date User Action Args
2011-09-03 01:54:28amaksetmessageid: <>
2011-09-03 01:54:28amaksetrecipients: + amak, asmeurer
2011-09-03 01:54:28amaklinkissue1777 messages
2011-09-03 01:54:28amakcreate