Benjamin Peterson [EMAIL PROTECTED] added the comment:
I agree with Antoine, so I'm just going to close this as rejected.
There's little benefit in it, but there is potential harm.
--
resolution: - rejected
status: open - closed
___
Python tracker
Antoine Pitrou [EMAIL PROTECTED] added the comment:
If it's only to please pychecker, then I don't think we should make this
change. It's potential gratuitous breakage, especially if people
subclass those classes.
--
nosy: +pitrou
___
Python tracker
New submission from Skip Montanaro [EMAIL PROTECTED]:
Attached is a patch to fix some pychecker complaints Neal Norwitz
uncovered. All involved tests pass. Submitting patch simply because
we're past beta3.
--
assignee: nnorwitz
components: Library (Lib)
files: pychecker.diff
keywords:
Benjamin Peterson [EMAIL PROTECTED] added the comment:
It doubt many people are inheriting from the classes that are changed to
new-style in the patch, but I thought it was policy that we didn't
change that until 3.0 just in case.
--
nosy: +benjamin.peterson
Skip Montanaro [EMAIL PROTECTED] added the comment:
I can see where that might be a problem. If that's the case I suspect
those property attributes should be changed. OTOH, do properties work on
classic classes?
___
Python tracker [EMAIL PROTECTED]
Georg Brandl [EMAIL PROTECTED] added the comment:
Read-only properties on old-style classes seem to work (though I don't
know if that is an implementation accident), insofar it seems harmless
not to apply this patch.
--
nosy: +georg.brandl
___
Python
Christian Heimes [EMAIL PROTECTED] added the comment:
No, they don't work correctly. Readonly properties in old style classes
aren't readonly:
class Example:
... @property
... def spam(self):
... return spam
...
example = Example()
example.spam
'spam'
example.spam = egg
Georg Brandl [EMAIL PROTECTED] added the comment:
Ah yes. But still, I'd call that harmless. Assigning to attributes
you're not supposed to assign to is detrimental in many cases.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3658