A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-August/037548.html below:

[Python-Dev] Make it an error to use __slots__ with classic classes

[Python-Dev] Make it an error to use __slots__ with classic classesTerence Way terry at wayforward.net
Sat Aug 9 13:42:03 EDT 2003
On Saturday, August 9, 2003, at 03:10  AM, Raymond Hettinger wrote:

>
> P.S.  The answer to the quick look question above is that
> __slots__ has no effect in Py2.2 but does in Py2.3
> because one is an old-style class written in pure python
> and the other is a new-style class derived from the
> MersenneTwister type.

That, to me, indicates that an exception is the wrong way to do
this...  it would be too easy to create non-backward compatible
code, especially as people start moving their classes to
new-style.

A brief test shows that PyChecker checks for this, however:
Warnings...

testslot.py:2: Using __slots__ in classic class foo has no effect, 
consider deriving from object


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4