Message7510

Author mete0r
Recipients mete0r
Date 2012-11-07.04:14:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352261683.39.0.775045967576.issue1985@psf.upfronthosting.co.za>
In-reply-to
Content
Jython 2.5.3 behaves differently than CPython (2.5, 2.6, 2.7) with following code:

----

class ReadonlyDescriptor(object):
    def __get__(self, instance, owner):
        return 123

class A(object):
    __slots__ = []
    attr = ReadonlyDescriptor()

A().attr = 2  # Jython 2.5.3: TypeError: readonly attribute in Jython 2.5.3
              # CPython 2.5:  AttributeError: 'A' object attribute 'attr' is read-only
History
Date User Action Args
2012-11-07 04:14:43mete0rsetrecipients: + mete0r
2012-11-07 04:14:43mete0rsetmessageid: <1352261683.39.0.775045967576.issue1985@psf.upfronthosting.co.za>
2012-11-07 04:14:43mete0rlinkissue1985 messages
2012-11-07 04:14:42mete0rcreate